Not with YES/NO but like this
Note: IEFBR14 always set RC0
// SET STEP1=1
// SET STEP2=0
//*
//TEST1 EXEC PGM=IEFBR14
//*
//IF1 IF TEST1.RC = &STEP1 THEN
// ELSE
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
TEST
//IFEND1 ENDIF
//*
//TEST2 EXEC PGM=IEFBR14
//*
//IF1 IF TEST2.RC = &STEP2 THEN
// ELSE
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE ALIAS NAME () -
RELATE ()
/*
//IFEND2 ENDIF
//
Roland
>All,
>
>
>is it possible to control the steps to be executed by a IF-Statement, i.
>e. with a variable?
>
>Like this:
>
>// SET SWITCH1=YES
>// SET SWITCH2=NO
>//*
>//* EXECUTE ONLY IF SWITCH1 IS SET TO YES
>//IF SWITCH1=YES
>//STEP01 EXEC PGM=IEBGENER
>//... more stuff
>//ENDIF
>//*
>//* EXECUTE ONLY IF SWITCH2 IS SET TO YES
>//IF SWITCH2=YES
>//STEP02 EXEC PGM=IEBGENER
>//... more stuff
>//ENDIF
>//*
>
>
>If I've understood the JCL docs corretly there are only some predefined
>variables (like "RC") that can be checked... I wonder if there is a way...
>
>
>Thanks....
>
>Bye,
>Michael
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: GET IBM-MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html