ON VAR statements are evaluated after all ON PGMST and ON SYSOUT statements have been addressed. ON VAR statements are usually, but not necessarily, followed by user-specified DO actions. The implied relationship between ON VAR statements and associated DO statements is: if the ON VAR statement criteria is satisfied, perform the associated DO statement actions.
In a new job scheduling definition, an empty ON VAR statement is followed by an empty DO statement. Additional ON VAR statements can be opened in the job scheduling definition as follows:
Multiple ON VAR blocks are generally interpreted sequentially from first to last, except when an ON VAR block contains an And/Or Boolean connector. All such blocks containing Boolean connectors are processed last regardless of their position in the list of ON VAR blocks.
If the conditions of an ON VAR block are satisfied, the accompanying DO actions are performed. The conditions of more than one ON VAR block can be satisfied; therefore, more than one set of DO statements can be performed.
Below are examples of ON VAR statements with various operators:
ON VAR Example 1:
ON VAR %%VARIABLE1
OPERATOR GT Greater than (>)
VAL %%VAR10
DO FORCEJOB
ON VAR Example 2, with a block of two ON VAR statements:
ON VAR %%VARIABLE2
OPERATOR NP Is not empty
VAL N/A A/O A
ON VAR %%VARIABLE3
OPERATOR IR In range (a<=x<=b)
MIN 10000
MAX 80000
DO FORCEJOB
Parent Topic |