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.





Hi................... I have records like this aaaa cccc bbbb And i want output like this bb..

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

Post New Answer

More COBOL Interview Questions

Write a program to explain size error.

0 Answers  


What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   IBM, RBS,


What is length is cobol?

0 Answers  


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

2 Answers  


What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?

8 Answers   Arigo Infotech, IBM,






Please let me know at which Scenarios we will go for STATIC call or DYNAMIC

3 Answers   IBM,


hi. This is Ram.i have one doubt.why can't we display comp-3 variables directly? let me answer quickly plez........

1 Answers  


How can you submit a job from COBOL programs?

2 Answers   ITC Infotech,


When would you use in-line perform?

2 Answers  


How can we know that cobol program is using report file or simple file....?

4 Answers  


what is MSGLEVEL?

1 Answers   IBM,


how can we get current dat and time thru cobol pgm

3 Answers   DELL,


Categories