sample code for read a 2nd record from last in flatfile how
can do?

Answer Posted / sunilkumar

First open the file in reverse order using OPEN command

OPEN FILE file-name REVERSE

Then read twice to get the 2nd last record.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is amode(24)?

684


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.

5063


What is the difference between external and global variables in COBOL?

813


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 is difference between static and dynamic call in cobol?

777






what is the difference between COBOL2 AND COBOL390?

2453


What is the difference between comp and comp-3 usage?

680


What is the Purpose of Pointer in the string?

643


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2658


how do you reference the ksds vsam file formats from cobol programs

666


Discuss about changing dataset name in proc.

760


How do u write test cases?

1638


Which Search verb is equivalent to PERFORM…VARYING?

685


example for sub strings ? and refernce modifications whit output pls

1846


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

720