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

What is the significance of 'above the line' and 'below the line'?

2 Answers   Nokia,


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

0 Answers   Accenture,


Why we need to use redefine clause when we can define the variable seperately... what is actual need....

5 Answers   Accenture,


Can we redefine the field of x(200) to less than 200?

0 Answers  


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  






using redefine can you redefine lower variable size to higher variable size?

3 Answers   Patni,


which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


what is SYNCHRONIZATION?

3 Answers   Syntel,


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?

3 Answers   Patni,


Can we move X(7) to S9(7) COMP?

1 Answers  


Categories