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 Posted / 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 |
Post New Answer View All Answers
What is the difference between goback, stop run and exit program in cobol?
Explain how to differentiate call by context by comparing it to other calls?
Have you used comp and comp-3 in your project? And how?
What is the difference between comp and comp-3?
i need a small 3d program using inline and outline.
how do you reference the ksds vsam file formats from cobol programs
Name the divisions, which are available in a cobol program?
how do you define single dimensional array and multidimensional array in your cobol?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
what happens if parmparameter passes zero bytes to the program
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What are the different rules of SORT operation?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
I have a File that has duplicate records. I need only those records that occur more than thrice.?