MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sorting multiple files using SORT Utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
JyotsnaMV
Beginner


Joined: 07 Aug 2003
Posts: 9
Topics: 5

PostPosted: Thu Mar 11, 2004 7:32 am    Post subject: Sorting multiple files using SORT Utility Reply with quote

Hi,

Can the SORT utility be used to sort more than one file within a single step of JCL?

Waiting for inputs....

Thanks,
Jyotsna
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12383
Topics: 75
Location: San Jose

PostPosted: Thu Mar 11, 2004 8:39 am    Post subject: Reply with quote

Jyotsna,

Here is a sample DFSORT/ICETOOL job which will allow you to sort more than 1 file in a single step.If you have syncsort at your shop then change the pgm name to synctool.

Code:

//STEP0100 EXEC PGM=ICETOOL                         
//*                                                 
//TOOLMSG   DD SYSOUT=*                             
//DFSMSG    DD SYSOUT=*                             
//IN1       DD DSN=YOUR INPUT FILE1,
//             DISP=SHR
//IN2       DD DSN=YOUR INPUT FILE2,
//             DISP=SHR
...
//OUT1      DD DSN=YOUR SORTED OUTPUT1,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)
//OUT2      DD DSN=YOUR SORTED OUTPUT2,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)
...
//TOOLIN    DD *
  SORT FROM(IN1) TO(OUT1) USING(CTL1)
  SORT FROM(IN2) TO(OUT2) USING(CTL2)                       
//CTL1CNTL  DD *
  SORT FIELDS=(....)
//CTL2CNTL  DD *
  SORT FIELDS=(....)
  SUM FIELDS=(....)
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Mar 13, 2004 1:53 am    Post subject: Reply with quote

having spent more than 20 years in application support I would advise against this type of process. What is gained by having the sort done in a single step. Generally this approach creates more problems than it solves.

I would be interested as to why the requirement to sort multiple files in the same step.

you would certainly be limited in the functionality and flexibility that using 2 sort steps would give you.

just the opinion of a lowly old support programmer who has been "around the block" more than a few times.
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group