Page 1 of 1

Can we sort particular column ??

PostPosted: Sat Nov 06, 2010 3:08 pm
by gauthamnagpur18
Hi ,

I have one COBOL output in which two headers and multiple records are there . Now whenever i use DFsort in jcl, then whole records and header gets sorted .
Another problem is whenever i use DFSort , all columns get sorted .can we sort particular column, i mean sorting only 4 columns out of 5 columns .

Pls help me asap.


Thanks & Regards
Gautham Raj

Re: Can we sort particular column ??

PostPosted: Sat Nov 06, 2010 4:01 pm
by NicC
We will get around to it as and when we want - not asap

I presume you are wanting help with DFSORT and not JCL so this should have been posted in the DFSORT section - it is what it is there for.
Also it is not clear what you are wanting. Show some sample input and the desired output. Use the code tags to make your data line up properly.

Re: Can we sort particular column ??

PostPosted: Sat Nov 06, 2010 6:27 pm
by enrico-sorichetti
look at dfsort smart tricks on how to sort detail records leaving headers and trailers alone

http://www.ibm.com/support/docview.wss? ... g3T7000094

Re: Can we sort particular column ??

PostPosted: Sat Nov 06, 2010 6:50 pm
by gauthamnagpur18
Thank you enrico-sorichetti...

Re: Can we sort particular column ??

PostPosted: Tue Nov 09, 2010 12:17 am
by Frank Yaeger
I have one COBOL output in which two headers and multiple records are there . Now whenever i use DFsort in jcl, then whole records and header gets sorted.


You can use the DATASORT operator of DFSORT's ICETOOL to sort the detail records while keeping the header and trailer record in place.

Another problem is whenever i use DFSort , all columns get sorted .can we sort particular column, i mean sorting only 4 columns out of 5 columns.


DFSORT sorts whatever YOU tell it to on the SORT statement YOU supply. If you want it to sort on specific columns, just specify those columns in the SORT statement.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080