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 |
Describe the cobol database components?
How can you get the ksds file records into your cobol program?
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
i want to learn mainframes. i completed MCA ,whats the future of mainframes
What divisions, sections and paragraphs are mandatory for a COBOL program?
How to open and see copy book ?
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
record length in spool?
in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?
What is the maximum length of a field you can define using COMP-3 in COBOL?
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?