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 are the divisions in a cobol program?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
how we rectify soc7 and soc4 errors in project?
What is the difference between working storage copybook and linkage section copybook?
HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?
What will happen if we generate GDG +2 version instead of +1 version?
What is cobol?
study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level
Why there is no questions in this column?
In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?
How many variables can be declared in w-s section.?
What is link edit in cobol?