View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Hi ,
I have the following step in a Proc
//IF02 IF (RC LE 4 AND ABEND=FALSE) THEN
execute some steps
//els ELSE
execute some steps
//ends ENDIF
Lets say my Jcl i XXX and my Proc name is YYY
Can i overrid my If statement from the jcl to say
IF (RC LE 8 AND ABEND=FALSE) THEN
Please Advice . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What is wrong with trying it yourself and then asking if you have problems. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
i Actually tried a few
ex : Jobname.Stepname new condition
Procname.Stepname new condition
Nothing worked
i know how to override CONDS and DSNs , but this i am not sure how to do |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Not sure that you can override IF/THEN/ELSE if it is in a PROC |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Not sure that you can override IF/THEN/ELSE if it is in a PROC |
As far as i know, this cannot be overridden. . . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which is why I NEVER use them within a PROC.
This is probably yet another case of bad planning / lack of testing. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
What I have done to make this work in a PROC is make the condition on the IF statement a Symbolic.
The default is set in the Proc, and it can be overriden from the Job. This works really nice. It just requires you plan ahead.
Here is an example (just a snippet):
Code: |
//DPPROC PROC CA7CARD='',
// CHKVAL='EQ 0'
......
//IFCRD IF CHKCARD.RC &CHKVAL THEN
.....
|
To Override from Job to bypass step:
Code: |
//CHKBND5 EXEC DPPROC,
// CA7CARD='021',
// CHKVAL='LT 0'
|
|
|
Back to top |
|
|
mtaylor
Active User
Joined: 20 Feb 2009 Posts: 108 Location: Kansas City
|
|
|
|
I couldn't remember if I included this in the JCL parser I wrote but symbolic replacement in IF statement is supported with the following caveat (JCL Ref 17-9). This is from the 390 version, I find it much more informative than the ZOS version (apparently someone decided to edit out or obfuscate a lot of useful information in the ZOS version of the JCL Reference).
Quote: |
You can specify symbolic parameters on IF/THEN/ELSE/ENDIF statements
provided that they resolve to one of the supported relational-expression
keywords listed in the preceding topic (that is, RC, ABEND, ...). Any other
symbolic parameters, even if accepted by the system, are not intended or
supported.
|
|
|
Back to top |
|
|
|