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 

Override SYSIN in 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
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Dec 29, 2021 7:47 am    Post subject: Override SYSIN in JCL Reply with quote

Yes, I appreciate this has almost been flogged to death, but I think my question is a little different.
First of all, let's look at JCL2
Code:

//ICKS142  JOB (xxxx),'IKS142',                         
//             MSGCLASS=O,CLASS=U,COND=(0,LT)                   
//JCL   JCLLIB ORDER=(xxxx.yyyy.INFOLIB,xxxx.yyyy.JCLLIB)         
//*                                                             
.... more lines
//SYSIN    DD DSN=xxxx.xxx.PARMLIB(IKS142P), 
//            DISP=SHR                       
.... more lines

Now, I need to run this JCL, but I need to change the name of the SYSIN file.
My thought (and I do appreciate that it is incorrect) was something like this. JCL1 would contain
Code:

//JCL1 JOB (CC00),'IKS142',MSGCLASS=X,TIME=1,                 
//             CLASS=1,REGION=0M,NOTIFY=&SYSUID                 
//*                                                             
//* OVERRIDE THE SYSIN FILE IN JCL2             
//*                                                             
//IKS142.SYSIN DD DSN=MY.SYSIN.FILE(0),               
//                DISP=SHR                                       
//*                                                             
//EXEC xxxx.yyyy.JCLLIB(JCL2)                                 

One suggestion by one of the architects here was to make an exact copy of JCL2 and simply change the SYSIN filename. I hate that because of the unnecessary (?) duplication of code/JCL (you don't have to be a genius to realize/guess that one day JCL2 will change, and noone will remember to change JCL1 as well).
So, given that this installation doesn't use PROC's, is there a way for JCL1 to call/run JCL2 and override the SYSIN file in JCL2 in some form based on my example?

Thanks
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Dec 29, 2021 10:34 am    Post subject: Reply with quote

misi01,

Quite simple. Make the contents of JCL2 as a PROC and invoke it with the overirde in the different jobs. This will help to add more jobs and also override any part of the PROC (any other dd name or new sysin)
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Dec 29, 2021 11:43 am    Post subject: Reply with quote

Unfortunately that's a non-starter. They don't use PROCS (don't even bother to go down that road querying why. I'm just a consultant with no say in the matter)
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Dec 29, 2021 1:04 pm    Post subject: Reply with quote

misi01,

If you have a scheduling package and they allow overrides of ddnames in JCL
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Dec 29, 2021 3:12 pm    Post subject: Reply with quote

Scheduling package? Would that be OPC?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Dec 29, 2021 4:41 pm    Post subject: Reply with quote

misi01 wrote:
Scheduling package? Would that be OPC?



yes OPC is one such scheduling package. You can use the panels and override the DD.

Also code a SYMBOL for the dataset name for the DDname you want to override and pass the value to the symbol based on JOB1 or JOB2
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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