Hi...................
I have records like this
aaaa
cccc
bbbb
And i want output like this
bbbb
cccc
aaaa
How can it possible ?.
Note:Please make sure records are in unsorted order.
somebody plzzz help me.
Answer / nsingh
SORT FIELDS=COPY
OUTREC FIELDS=(1,80,SEQNUM,ZD,4)
It will add sequence number at position 81 of 4 bytes in
ascending order.
Now Sort the sequence number in descending order to reverse
the sequence and then remove sequence number from file.
SORT FIELDS=(81,4,ZD,D)
OUTREC FIELDS=(1,80)
| Is This Answer Correct ? | 1 Yes | 0 No |
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
Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - 40. The result in X is
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.
How do you reference the fixed block file formats from cobol programs
How to Pass table from a cobol program to another cobol program and how to use that table in called program
is it mandatory to give data division before procedure division ? wht happens if i give procedure division first thn data division ? reply soon
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?
) How do u handle errors in BMS macro
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
subscript and index r not coded in u r application program what will happen?
Can the OCCURS clause be at the 01 level?