MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic Input files in a JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Thu Jul 01, 2010 11:48 am    Post subject: Dynamic Input files in a JCL Reply with quote

Hello
In one of my project, I need to find existing datasets , and feed that as input file into a program for a report generation.
I was able to create the list of datasets using the LISTCAT LEVEL command
Code:
//LISTCAT  EXEC PGM=IKJEFT01,DYNAMNBR=20                   
//*                                                       
//SYSTSPRT DD DSN=&&TEMP,                       
//           UNIT=SYSOUT3,DISP=(,CATLG,DELETE),           
//           RECFM=FB,LRECL=80,BLKSIZE=0,AVGREC=K,         
//           SPACE=(1200,(30,20),RLSE),RETPD=3             
//SYSTSIN  DD *                                           
   LISTCAT LEVEL(AXPROD.WBQ.DNPTAX.DISKOA)       
   


Then using the sort, I formated the above output into a DD concatenaton as shown below into a temp file.
Code:
//DISKIA DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M0903,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M0904,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M0907,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M0908,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M0912,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M1.M1004,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M2.M1006,DISP=SHR 
//         DD DSN=AXPROD.WBQ.DNPTAX.DISKOA.M6.M1006,DISP=SHR



Then I tried to include this tem file using the INCLUDE command.


But JCL is not working because I can't do INCLUDE using a temp file.
I tried to write this to a PDS member, but still in the same job, i can't execute these two steps. Looks like I have to split this into two jobs.
Is there any way I can do this task in a single job?
Thanks
Jimmy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jul 01, 2010 11:55 am    Post subject: Reply with quote

Jamylady,

Look at the smart DFSORT trick "Copy GDGs created today" which reads in the LISTCAT info and generates dynamic JCL to be submitted via INTRDR.

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Fri Jul 02, 2010 3:40 am    Post subject: Reply with quote

Thanks Kolusu,
Two problems here.
1. We don't have DFSORT. We use Syncsort. But the link above is excellent and thanks a lot for that.
2. We use Jobtrac scheduler. Although dynamically writting jobs to the scheduler is possible, it is very difficult to break our corporate techinical standards !!!-

If there is no other options, I might have to go for two jobs.
Thanks
JA
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Fri Jul 02, 2010 3:51 am    Post subject: Reply with quote

Well, did you try to work-upon the logic that is described there in the link? It might or might not work based upon the version of SyncSort your shop is using - but if you try that, you'll come to know what the error is - and from there you can think on any further appraoch, if needed.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Fri Jul 02, 2010 3:53 am    Post subject: Reply with quote

Also, why do you think INTRDR will be a problem?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Jul 02, 2010 9:00 am    Post subject: Reply with quote

Jamylady wrote:

2. We use Jobtrac scheduler. Although dynamically writting jobs to the scheduler is possible, it is very difficult to break our corporate techinical standards !!!-


If you need the easier route then code 2 jobs or you can code a cobol program to dynamically invoke IDCAMS and then dynamically allocate the files.

Check this link which has an example of Cobol calling IDCAMS.

http://www.mvsforums.com/helpboards/viewtopic.php?p=10515#10515

Check this link for an example for dynamic Allocation in COBOL using BPXwDYN

http://mvsforums.com/helpboards/viewtopic.php?t=1905&highlight=BPXWDYN

Anuj,

Not Many Shops allow submission of Job via INTRDR especially in the production environment.


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Mon Jul 05, 2010 5:35 am    Post subject: Reply with quote

Hi Kolusu,

Yes, I agree, however, what I've seen that if the Job submitted, via INTRDR, is defined to scheduler it did not create problem/s.

Regards,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group