Please let me know how to ovrride a 'IF' statment which declared in a jcl proc.
//STATCHK IF (STEPN100.BATCHIN.RC = 0 | STEPN120.RC = 2) THEN
Now, how can we override the IF statement from a JCL.
In the above it's impossible, but if you really want to override IF-THEN-ELSE logic in PROCs, you can do so, in a generalized, but somewhat convoluted way, by adding a parametrized dummy condition, like
//XXXXXXX PROC OVERIF='RC >= 0 | RC < 0'
//STATCHK IF (STEPN100.BATCHIN.RC = 0 | STEPN120.RC = 2) & &OVERIF THEN
The "'RC >= 0'
," is always true, so it has no influence on original, and likewise for the "RC < 0'
", which is always false. Obviously, the above code assumes that the entire original conditional expression is enclosed in parentheses, and that there is an RC to test against!
Change OVERIF into 'RC <= 0
' to stop execution of the step, change it into ' RC >= 0 | RC >= 0
' to always execute it.