Page 1 of 1

Who can help me to complete there cobol execises

PostPosted: Sun Mar 07, 2010 2:49 pm
by Trenfen
Exercise 1
Code a program named ‘tsoid01’ in ‘tsoid.TRAIN.PDS’
ACCEPT a text from SYSIN to 4 characters;
judge this text is numeric or not;
if it is a numeric text, then divide by 2, then display ‘result is’ quotient and ‘remainder is’ remainder;
if it is not a numeric text, then display ‘it is not a correct number’ with the text

Data Preparation
Allocate a PS dataset named ‘tsoid.INPUT.PS’ (record format is fixed-length, record length is 10)

Add records to this PS file as the following:
A ABADAEA
A ASDFJAJ
B ADFQWB
C IOQWEA
A CQWOE
B ASPQOE
C OEUWCO

Exercise 2
Code a program named ‘tsoid02’ in ‘tsoid.TRAIN.PDS’
read the file ‘tsoid.INPUT.PS’
Do the following process:
If start char is ‘A’, calculate the A numbers in the string
If B, calculate the B numbers
If C, calculate the C numbers
Then write the number and ‘A’ or ‘B’ or ‘C’ to the tables
Search a item which the number is 4
Firstly display all contents of the table, then display the index of the item which the number is 4

If you would like to help me then show me the codes please , thank you!

Re: Who can help me to complete there cobol execises

PostPosted: Sun Mar 07, 2010 9:56 pm
by dick scherrer
Hello and welcome to the forum,

If you would like to help me then show me the codes please
That is NOT help. . . That is doing the work for you. We won't do the work for you. We will HELP you get the work done.

If anyone posts complete code, it will be deleted.

What have you coded for exercise 1? Where are you stuck? If we are to help, you must show "where you are".

Re: Who can help me to complete there cobol execises

PostPosted: Mon Mar 08, 2010 1:28 pm
by Trenfen
I have already completed by myself , thanks for your reply.

Re: Who can help me to complete there cobol execises

PostPosted: Tue Mar 09, 2010 1:27 am
by dick scherrer
You're welcome - good to hear it is working :)

d