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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / hanish
Flat file may be read in reverse order by using the following code
READ file-name into data-name REVERSED.
| Is This Answer Correct ? | 0 Yes | 3 No |
What is the figurative constant in cobol?
how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?
How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.
)what is retrieve?
how many bytes does s9(7)COMP-3 field occupies?
diffrence between renames and redifnes with examples
Explain complete concept of table handling in COBOL with an example?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please
what is the difference between PA & PF keys?
Difference between array and sub-script ?
write a program to eliminate duplicate records in a input file and send them to output file.
How to display the index.(displacement from an array)