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
 

 

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: 4648
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: 4648
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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