How to read records which is in sequential file in reverse
order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my
doubt any one
Answer Posted / mustafa i
Abhishekh your logic is correct
just to add to it
we can even do it by reading the file only once.
1)Read File & Move into an array until EOF also increment a
counter after every read.
3)By decrementing the Counter and using it as subscript
we can now read the array and hence the file in
reverse order.
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
what are decleratives in cobol?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Have you used comp and comp-3 in your project? And how?
What is amode(31)
how do you define single dimensional array and multidimensional array in your cobol?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What is length is cobol?
Explain how to differentiate call by context by comparing it to other calls?
Which Search verb is equivalent to PERFORM…VARYING?
Name some of the examples of COBOl 11?
What is the local-storage section?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?