Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the difference between goback, stop run and exit program in cobol?

1593


Explain how to differentiate call by context by comparing it to other calls?

1188


Have you used comp and comp-3 in your project? And how?

2488


What is the difference between comp and comp-3?

1189


i need a small 3d program using inline and outline.

2216


how do you reference the ksds vsam file formats from cobol programs

1196


Name the divisions, which are available in a cobol program?

1238


how do you define single dimensional array and multidimensional array in your cobol?

1110


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2592


what happens if parmparameter passes zero bytes to the program

2134


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

1238


What are the different rules of SORT operation?

1146


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

2552


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1218


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9898