Page 1 of 1

How to sort

PostPosted: Mon Dec 24, 2007 1:49 pm
by madhavmannem
how to sort by using jcl ?

Re: How to sort

PostPosted: Mon Dec 24, 2007 9:53 pm
by Frank Yaeger
Here's an example of a DFSORT job that sorts the input records on positions 11-15, character, ascending:

//S1 EXEC PGM=SORT       
//SYSOUT    DD  SYSOUT=*     
//SORTIN DD DSN=...  input file                 
//SORTOUT  DD DSN=...  output file 
//SYSIN    DD    *           
  SORT FIELDS=(11,5,CH,A)     
/*


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/servers/storage/supp ... tmpub.html