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 |
if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error
wht happens if we dnt give scope terminator ?
how to know that the file has 300 records how to acess it?
what happens if we dont close cursor in db2-cobol pgm?
what is the diff b/w select stsmt and cursor ?
suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.
what is the use of comp2 ? where can we use it with example ?
Why IBM?
how you will define variables length in cobol.
which is better either static call or dynamic call? and why?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.