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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am


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