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
How do u write test cases?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Name some of the examples of COBOl 11?
What are declaratives and what are their uses in cobol?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
what happens if parmparameter passes zero bytes to the program
how do you reference the variable unblock file formats from cobol programs
What are the rules of the move verb?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is length is cobol?
What is static and dynamic call in cobol?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What are the various section in data division and briefly explain them.