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
 
Dynamic file allocation in JCL

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

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Mar 18, 2010 5:17 pm    Post subject: Dynamic file allocation in JCL
Reply with quote

I have a sort step, in which the number of output files is to be determined by the number of records in a Vsam file.

I have developed a dynamic sort card
Code:
  SORT FIELDS=COPY                                             
  OUTFIL FNAMES=SORTOUT,REMOVECC,                             
  HEADER1=(3:'SORT FIELDS=COPY',80:X),                         
  OUTREC=(3:C'OUTFIL FILES=',SEQNUM,2,ZD,18:C',',80:X,/,       
   5:C'INCLUDE=(56,5,CH,EQ,C''',37,5,C'''),',80:X,/,           
   5:C'OUTREC=(1:1,55)',80:X)   


Output1 :
Code:
 SORT FIELDS=COPY                   
 OUTFIL FILES=01,                   
   INCLUDE=(56,5,CH,EQ,C'AAAAA'),   
   OUTREC=(1:1,55)                   
 OUTFIL FILES=02,                   
   INCLUDE=(56,5,CH,EQ,C' 2382'),   
   OUTREC=(1:1,55)   


I hvae another dynamic sort for the number of files
Code:
 SORT FIELDS=COPY                                           
 OUTFIL BUILD=(1:C'//SORTOF',SEQNUM,2,ZD,C'  DD DSN',       
   C'=T.TPS266DP.FILE',SEQNUM,2,ZD,C',',80:X,/,             
   C'//              DISP=(,CATLG,DELETE),',80:X,/,         
   C'//              UNIT=SYSDA,',80:X,/,                   
   C'//              SPACE=(80,(1000,500),RLSE),',80:X,/,   
   C'//              DCB=(RECFM=FB,LRECL=80),',80:X) 


Output file content
Code:
//SORTOF01  DD DSN=T.TPS266DP.FILE01,     
//              DISP=(,CATLG,DELETE),     
//              UNIT=SYSDA,               
//              SPACE=(80,(1000,500),RLSE),
//              DCB=(RECFM=FB,LRECL=80),   
//SORTOF02  DD DSN=T.TPS266DP.FILE02,     
//              DISP=(,CATLG,DELETE),     
//              UNIT=SYSDA,               
//              SPACE=(80,(1000,500),RLSE),
//              DCB=(RECFM=FB,LRECL=80),   




Now I need to give the content of output2 as the files in a job using the output1 as the sortcard.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Mar 18, 2010 5:43 pm    Post subject: Reply to: Dynamic file allocation in JCL
Reply with quote

OK. I guess I don't understand what the question is. You've got your input sort parameters for a SORT step and the details for the number of output datasets you'll need. They just need to be added or included to a job and then that job can be submitted.
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Mar 18, 2010 6:18 pm    Post subject: Re: Reply to: Dynamic file allocation in JCL
Reply with quote

superk wrote:
They just need to be added or included to a job and then that job can be submitted.


Yes i want to know how to combine them.
How could the content of a flat file(output2) be given as the output dataset for a Sort step ?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Mar 18, 2010 6:34 pm    Post subject: Reply to: Dynamic file allocation in JCL
Reply with quote

I don't know. I guess however your site handles these situations and what rules/standards you have to abide by.

You could use the INCLUDE statement. You could dynamically build and submit a job, either in its entirety or partially. Does your job scheduling system allow you to bring in external files to your application and then include them as part of the job stream?
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Fri Mar 19, 2010 2:43 pm    Post subject:
Reply with quote

superk

I tired with INCLUDE and it Worked!!!

Thanks icon_biggrin.gif
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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