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
Are you comfortable in cobol or jcl?
Write a cobol program making use of the redefine clause.
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...)
How do you differentiate between cobol and cobol-ii?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
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 ......
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
what is difference between cobol and cobol/400
What are the different open modes available in cobol?
what is the difference between COBOL2 AND COBOL390?
What is length is cobol?
What guidelines should be followed to write a structured cobol prgm?
What are different data types in cobol?
) How do u handle errors in BMS macro?
Name some of the examples of COBOl 11?