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
How do you reference the following file formats from cobol programs?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
Which is not true about evaluate statement
how do you reference the variable block file formats from cobol programs
Which mode is used to operate the sequential file?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What are 77 levels used for?
how do you reference the ksds vsam file formats from cobol programs
How can you get the ksds file records into your cobol program?
What are different data types in cobol?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
Are you comfortable in cobol or jcl?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
In which area will you utilize 88 level items in cobol?
What is the difference between perform … with test after and perform … with test before?