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 

Using a parameter in a proclib

 
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: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Mon Sep 11, 2017 4:04 am    Post subject: Using a parameter in a proclib Reply with quote

I have a proclib that looks something like this
Code:

//DEFAULT  PROC MBR=&MBR,                                         
//         PSB=&PSB                                               
//*                                                               
//BMPPROJ  EXEC PGM=DFSRRC00,                                     
//             REGION=0M,                                         
//             TIME=1,                                             
//             PARM=(BMP,&MBR,&PSB,,,C00000,,1,,1,10,,,IM1B,,,,,,4)
//*                                                               
// INCLUDE MEMBER=BT4I2                                           
// INCLUDE MEMBER=STEPDB                                           
//*                                                               

What I would like to do would be to change it something like this instead:-
Code:

//DEFAULT  PROC MBR=&MBR,                                         
//         PSB=&PSB,
//         DEBUG=                                               
//*                                                               
//BMPPROJ  EXEC PGM=DFSRRC00,                                     
//             REGION=0M,                                         
//             TIME=1,                                             
//             PARM=(BMP,&MBR,&PSB,,,C00000,,1,,1,10,,,IM1B,,,,,,4)
//*                                                               
// INCLUDE MEMBER=BT4I2
// IF DEBUG <> '' THEN                                           
//   INCLUDE MEMBER=&DEBUG                                           
//  ENDIF
//*                                                               


Basically, the default would be to NOT include the STEPDB include statement UNLESS the user passes it in as sort of parm.

My impression is that the IF/ENDIF can only be used to test returned codes from specific jobs.
I know I could create the JCL/PROCLIB using skeletons (done that before), but I'm just wondering if there is some simply variation I'm not aware of.
(For example, maybe I could have the default as being DEBUG=DUMMY and the create a DUMMY include with nothing in it????
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Sep 11, 2017 11:37 am    Post subject: Reply with quote

misi01,

You cannot test a parm on IF/THEN/ELSE/ENDIF statement construct. The only keywords that are supported are
Code:

RC
    indicates a return code
ABEND
    indicates an abend condition occurred
¬ABEND
    indicates no abend condition occurred
ABENDCC
    indicates a system or user completion code
RUN
    indicates that the specified step started execution
¬RUN
    indicates that the specified step did not start execution


here is the link that explains this.

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieab600/relexkey.htm

In your case I suggest you always INCLUDE the DEBUG member and if you don't want it simply override it to DUMMY from your invoking JCL
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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