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!