Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Dynamically allocating number of output dataset in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Tue Jul 14, 2009 4:50 pm    Post subject: Dynamically allocating number of output dataset in DFSORT
Reply with quote

I have a input file which is having more 15000 lines and i wanna split it into several output files each having 5,000 records. This is the JCL im using,

Code:


//SPLITFLS EXEC PGM=SORT                                               
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SORTIN   DD DSN=input.xxx.yyy.zzzzz,DISP=SHR         
//SORTOF01 DD DSN=output1,                   
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                       
//            SPACE=(CYL,(1,1),RLSE),                                   
//            RECFM=FB,LRECL=80                                         
//SORTOF02 DD DSN=output2,                   
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                       
//            SPACE=(CYL,(1,1),RLSE),                                   
//            RECFM=FB,LRECL=80                                         
//SORTOF03 DD DSN=Output3,                   
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                       
//            SPACE=(CYL,(1,1),RLSE),                                   
//            RECFM=FB,LRECL=80                                         
//SYSIN    DD *                                                         
   SORT FIELDS=COPY                                                     
    OUTFIL FILES=01,ENDREC=5000,REMOVECC,                               
     TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8)) 
    OUTFIL FILES=02,STARTREC=5001,ENDREC=10000,REMOVECC,               
     TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8)) 
    OUTFIL FILES=03,STARTREC=10001,ENDREC=15000,REMOVECC,               
     TRAILER1=(2/,'RECORDS COPIED IN THIS RPT: ',COUNT=(M11,LENGTH=8)) 
//*                                                                     



How to allocate output datasets dynamically?

For example :

If an input file comes with 30,000 lines,according to my requirement i should seperate this into 6 files. At the time of processing i shuld give only number '6' my JCL should automatically allocate output datasets.

Please give me some suggestions!!
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 14, 2009 8:28 pm    Post subject:
Reply with quote

You could use the technique shown in the "Split a file to n output files dynamically" Smart DFSORT Trick to divide the records. You could "generate" the output DD statements automatically and create a job to submit to the internal reader - see the "Generate JCL to submit to the internal reader" Smart DFSORT Trick. The Smart DFSORT Tricks are at:

http://www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000094
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us