How To get the last record in VSAM file in cluster?
and How can u get the ksds file records into ur cobol
program ? Pls tell me about these two questions.

Answer Posted / shivani

Move highvalues to the key of the VSAM file and the issue Readnext record command. Then give Readprev command. This will read the last record. In VSAM, there is one command HURBA, Using that we can read the last record, If you want to know more about go to IBM RED BOOKS. You will get the solution.
by using the HURBA we can get the max records by using the CKD count key data we will get the last record

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What parameter of the job statement is used to limit the cpu time consumed by the job?

1023


what is use of dcb parameter in dd statement?

1007


What do you know about jcl?

852


Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?

2438


Name a few IBM utility programs, and explain its function.

4684


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?

1210


What is one line to pass PARM from JCL to COBOL?

4664


How is the record format of an output dataset specified?

974


Explain the purpose of dd * statement in jcl?

808


How does the jcl specify the job to os?

887


How dummy is used in jcl?

844


What is multithreading in jcl?

1176


I need exexution process for JCL programs

2024


when can a job time-out occur? How to overcome that?

966


What are hierarchy levels in jcl?

1242