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


Please Help Members By Posting Answers For Below Questions

How do u write test cases?

1727


i want a program using by if, evaluate , string, unstring, perform, occurs?

4203


Name some of the examples of COBOl 11?

2795


What are declaratives and what are their uses in cobol?

808


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?

818






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?

1904


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 ......

11184


what happens if parmparameter passes zero bytes to the program

1763


how do you reference the variable unblock file formats from cobol programs

879


What are the rules of the move verb?

829


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

863


What is length is cobol?

761


What is static and dynamic call in cobol?

691


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...)

2033


What are the various section in data division and briefly explain them.

819