How to read records in reverse order in flat file?
I know we can do it by reading all records into an array....
Then read records in reverse order by using subscript or index
but can any body give me the exact code.
Answer Posted / muttaiah
Narayan if we use your sort card we will get records in
reverse order but along with sequence numbers in cols 81-
84. You are not trimming the seq numbers
Stp1:
SORT FIELSD=COPY
OUTREC=(1,80,SEQNUM,4,ZD)
stp2:
SORT FIELSD=(81,4,ZD,D)
Outrec=(1,80)
The output file will have the records in reverse order.
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
how do you define single dimensional array and multidimensional array in your cobol?
Give some examples of command terminators?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
Name some of the examples of COBOl 11?
Define cobol?
What are declaratives and what are their uses in cobol?
What is perform what is varying?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Differentiate between structured cobol programming and object-oriented cobol programming.
What are literals?
What kind of error is trapped by on size error option?
) how do u code after getting data?
how do you reference the variable block file formats from cobol programs
Difference between cobol and cobol-ii?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?