I want to use one JCL instead of 2 JCL to run 2 different steps. For example, step 1 to 5 are same for 2 JCLs but step 6 is different among the 2 JCLs. So instead of using 2 JCL, I want to use IF statement for step 6. such as
// set Company = variable;
//Step6 IF ( &Company EQ 1 ) Then
//co1 Exec Proc 1
//co2 Exec Proc 2
I find when variable is 1, then Proc 1 is executed, but when variable is not 1, then both Proc 1 and Proc 2 are executed????
But if I replace the &Company with RC, then it works fine. In my case, I am not checking the reture code. I am checking a variable which I pass into the JCL?
Will JCL IF statement work fine for variable or it can only work with RC?