> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of George, William (DHCS-ITSD)
> Sent: Thursday, June 05, 2008 3:26 PM
> To: [email protected]
> Subject: Sort Multiple Files in One Step
> 
> I have 10 files with the same layout and all must be sorted using the
> same sort criteria.
> 
> Each file must be sorted into its own separate output file. Is it
> possible to put this SORT into one step instead of creating 
> 10 separate
> steps?
> 
> On a glance through some sort documentation I was THINKIN I could use
> SORTINnn in some manner but according to the doc this is used 
> for MERGE
> only.
> 
> I was thinking something like
> 
> //SORT001  EXEC PGM=SORT,REGION=4096K,PARM='CORE=MAX'       
> //SYSOUT   DD  SYSOUT=*                                     
> //SORTIN01 DD  DSN=INPUT.NUMBER1,DISP=SHR  
> //SORTIN02 DD  DSN=INPUT.NUMBER2,DISP=SHR  
> //SORTIN03 DD  DSN=INPUT.NUMBER3,DISP=SHR  
> //...
> 
> //SORTOF01 DD  DSN=OUTPUT.NUMBER1,DISP=OLD
> //SORTOF02 DD  DSN=OUTPUT.NUMBER1,DISP=OLD
> //SORTOF03 DD  DSN=OUTPUT.NUMBER1,DISP=OLD
> //...
> //SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,(15,1))                
> //SORTWK02 DD  UNIT=SYSDA,SPACE=(CYL,(15,1))                
> //SORTWK03 DD  UNIT=SYSDA,SPACE=(CYL,(15,1))                
> //SYSIN    DD  *                                            
>   SORT FIELDS=(10,12,A),FORMAT=CH                           
> 
> Thanks for any ideas.
> 
>  
> 
> Bill

Use ICETOOL.

//MULTSORT EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
 SORT FROM(I1) TO(O1) USING(SORT)
 SORT FROM(I2) TO(O2) USING(SORT)
 SORT FROM(I3) TO(O3) USING(SORT)
/*
//SORTCNTL DD *
 SORT FIELDS=(10,12,A),FORMAT=CH
/*
//SORTWK.. DD ...

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to