I had 100 records and i want to execute last three records by
using cobol programming?what will be coding?

Answer Posted / farid

In jcl we can do as follows.........

1st skip the 97 recordes and write rest 3 into another file
using sort utilities(with the help of jcl).now cobol program
can use the 2nd file which has only last 3 records

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065


What are the different open modes available in cobol?

722


What are the pertinent COBOL

2045


What are the cobol coding sheets?

666


How many bytes S(8) comp field occupy and its maximum value?

1635






How many sections are there in data division in COBOL?

680


Have you used comp and comp-3 in your project? And how?

2010


What are the pertinent COBOL commands?

2626


What is the difference between next sentence and continue in cobol programing language?

712


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720


What are various search techniques in cobol? Explain.

650


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


What is amode(31)

726


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

710


What rules are followed by the search verb.

638