Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
No new posts Need urgent suggestion on DFSORT subratarec DFSORT/ICETOOL 6 Wed Mar 21, 2018 8:46 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am
This topic is locked: you cannot edit posts or make replies. How could i share my personal dataset... samenxia163 TSO/ISPF 1 Fri Mar 09, 2018 12:18 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us