I have two questions here.
1. How to read a flat file in reverse order?
2. How to read a VSAM KSDS file in reverse order?
In both the cases we donot know the total number of records.
Answer Posted / kingmanish
For the KSDS file we can set the pointer on the last record.
After that use the command READ Previous to read the
records in the reverse order.
I am not very sure about flat file. May be we can use a
turn around.
Sort the file in descending order first and then start
reading.
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What type of SDLC u followed? Why?
What are all the divisions of a COBOL program?
what happens if parmparameter passes zero bytes to the program
What is the difference between structured cobol programming and object alternativelyiented cobol?
What are the cobol coding sheets?
What is redefines clause in COBOL?
What is difference between static and dynamic call in cobol?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Mention the guidelines to write a structured cobol program?
State the various causes of s0c1, s0c5 and s0c7.
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
How to print 10 to 1 if the input have only 10 digit number?
Write the code to count the sum of n natural numbers.
What are the rules of the move verb?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?