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 Comm?
2 Answers IBM, Kemper Corporation,
What is the meaning of 'TALLING' verb in cobol?
can we redefine 77 level item is it possible
In EBCDIC, how would the number 1234 be stored?
I want ALL ERROR codes in VSAM
3 Answers American Express, TCS,
How many maximum number of procedures can we write in one COBOL program?
how will u code parm parameter and where pls ?
Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)
which one is the best of com and com-3.using of real time ?
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
what is amode(24), amode(31), rmode(24) and rmode(any)?