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.



How To get the last record in VSAM file in cluster? and How can u get the ksds file records into u..

Answer / 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

More JCL Interview Questions

what is d/f b/w sysout & sysprint

4 Answers   TCS,


How do you skip a particular step in a proc/JOB?

5 Answers   CSC, CTS,


What is Automatic Restart ? EXEC PGM = PROG1, RD = R (Is it the Restart of a JOBSTEP or Restarting the execution of the program?) Do we Restart it or it automatically Restarts executing again and again ? Then when it will finish executing ? or After Abending, when we submit it again, then it is Restarted from the Last successful Checkpoint ? If some JOBSTEP is abending, what is the benifit to Restart it, WILL IT NOT ABEND AGAIN if you don't change the LOGIC ?

1 Answers   IBM,


How can the disposition of sysout datasets be set for an entire jobstream?

0 Answers  


how to eliminate the duplicates in sorting

4 Answers   Fidelity,






wht do u mean by internal reader in jcl ? wht is the use of internal reader ?

1 Answers   Syntel,


What methodology can be adapted to transfer data to a program that is coded using the exec statement?

0 Answers  


Can you delete the GDG base without deleting GDG generations ?

7 Answers   Cap Gemini,


I have a job which is a long-running one. Processes millions of records. Due to some run-time problem (not a problem due to the job/data) the job abends.What needs to be done to make the job complete successfully.

4 Answers   TCS,


What is RESTART? How is it invoked?

8 Answers   HSBC,


What is the use of ikjeft1b utility in jcl?

1 Answers  


What are some jcl statements that are not allowed in procedures?

0 Answers  


Categories