Here is a neat little trick I learned from a guy at CA, using SET and IF. I use this a lot now, and other than needing a dummy step if I am testing the first step in a job, it works great. I have been able to nest my IF statements sometimes 3 deep when I have complex processing that I want to switch on or off.

Billy

//*
//*     Run the TEST1 process? Set to 1 if yes, 0 if no:
//  SET RUNTEST1=0
//*
//FIRSTSTP  EXEC PGM=IEFBR14        Dummy first step for IF tests
//*
//I@TEST1      IF &RUNTEST1=1 THEN  "IF" cannot be used before 1st step
//TEST1PGM  EXEC PGM=IEFBR14
//*
//L@TEST1      ELSE
//TEST1OTH  EXEC PGM=IEFBR14
//*
//E@TEST1      ENDIF
//

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to