I want to execute a step in JCL depending on the return codes of previous steps using COND parameter and not using IF THEN clause.
Eg : Lets say there are 4 steps viz., STEP1, STEP2, STEP3 and STEP4.
//STEP1 EXEC PGM = PGM1
//STEP2 EXEC PGM = PGM2
//STEP3 EXEC PGM = PGM3
//STEP4 EXEC PGM = PGM4
Now I want to execute STEP4 if the return code of all the previous 3 steps is zero. Assume we are not checking for the return codes for the STEP2 and 3. By using IF clause, we can accomplish this by having the following piece of code :
// IF STEP1.RC = 0 AND STEP2.RC = 0 AND STEP3.RC = 0 THEN
// STEP4 EXEC PGM = PGM4
But i want it to be accomplished using COND parameter. Is there a way out for this? Do tell me how to use the conditional parameters (AND , OR) with COND parameter.