Previous Topic

Next Topic

Book Contents

Book Index

Boolean "IF" Logic Example 1

This example illustrates Control-M’s ability to perform Boolean "IF" logic.

The original JCL:

//PDPA0001 JOB (......),BILL,CLASS=A
//*
//* %%IF %%TIME LT 120000
//*   %%SET %%PGMA=MORNPGM
//* %%ELSE
//*   %%SET %%PGMA=AFTPGM
//* %%ENDIF
//*
//STEP01   EXEC PGM=%%PGMA
...

//

The submitted JCL at 1:00 p.m:

//PDPA0001 JOB (......),BILL,CLASS=A

//
//* %%IF %%TIME LT 120000
//* %%ELSE
//*   %%SET %%PGMA=AFTPGM
//* %%ENDIF
//
//STEP01   EXEC PGM=AFTPGM
...

//

The %%IF expression is not true since it is past 12:00 noon; therefore, the statements following %%ELSE are executed. The program executed in STEP01 is AFTPGM.

Parent Topic

Boolean "IF" Logic