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 |
how can u pass the values into db2 values from cobol ?
What is R-mode and A-mode?
How will you find the currepted records in a file
how to pass 100 to s9(4) how r they inserted ?
Can the OCCURS clause be at the 01 level?
can we use the two 01 level in file discription ?
What are the different types of condition in cobol and write their forms.
What is tne need to use sub programs in Cobol?
BY seeing a program how can we say that it is static call or dynamic call
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad
What is the use of EVALUATE statement?