This section defines the fundamental operators of Advanced job programming in SCHEDULE. Note that there are in some cases more than one way to define an expression.
Assignment operator |
|
Operator |
Description |
A = B |
Assigns the value of B to A |
Integer operators |
||
Operator |
Alternate |
Description |
A < B |
A .LT. B |
Evaluates to true if A is less than B |
A > B |
A .GT. B |
Evaluates to true if A is greater than B |
A <= B |
A .LE. B |
Evaluates to true if A is less than or equal to B |
A >= B |
A .GE. B |
Evaluates to true if A is greater than or equal to |
A :=,= B |
A .EQ. B |
Evaluates to true if A is equal to B |
A != B |
A .NE. B |
Evaluates to true if A is not equal to B |
A + B |
|
Evaluates to the sum of A and B |
A - B |
|
Evaluates to the difference between A and B |
A * B |
|
Evaluates to the product of A and B |
A / B |
|
Evaluates to the quotient of A and B |
A % B |
|
Evaluates to the integer remainder of B and A |
String operators |
|
Operator |
Description |
A .LTS. B |
Evaluates to true if A is less than B |
A .GTS. B |
Evaluates to true if A is greater than B |
A .LES. B |
Evaluates to true if A is less than or equal to B |
A .GES. B |
Evaluates to true if A is greater than or equal to B |
A .NES. B |
Evaluates to true if A is not equal to B |
A .EQS. B |
Evaluates to true if A is equal to B |
BOOLEAN operators |
|
Operator |
Description |
A .NOT. B |
Evaluates to true if both A and B evaluate to true |
A .OR. B |
Evaluates to true if either A or B evaluate to true |
.NOT. A |
Evaluates to true if A evaluates to false |
FILE_NOT_FOUND |
Evaluates to true if filename is found |
There are four SCHEDULE job lists in which the advanced job interaction described above can be used. There are specific ways you can use each of these lists to enhance your job runs and micro-manage job interaction. The lists that can include these advanced evaluations are:
Example: Suppress the job run
IF count .eq. 20 THEN SUPPRESS_RUN
Example: Put the job in a wait state
IF disk_space .ge. 20000 THEN WAIT
Example: Set a variable to a new value
IF job_success .le. 12 THEN SET job_success .eq. 0
The SET statement may also be used to assign a variable on it's own unconditionally in the resource list.
IF job_failure .eq. 5 THEN SET rerun_job_set .eq. 0
The SET statement may also be used to assign a variable on it's own unconditionally in the End Actions list. The WAIT and SUPPRESS_RUN statements may not be used in an End Actions list since the job has already completed when the list is processed.
Note: Initiates usually only run upon successful completion. However, an initiate can also run if the current job completes with WARNING, ERROR or FAILURE status depending on how completion status is defined.
Using variables, one or more initiate jobs can be selectively suppressed depending on the results of a variable evaluation attached to the initiate.
NEXT_JOB, IF DISK .lt. 1000
REPORT, IF RUN_REPORT .eqs. "TRUE"
FINISHED, SUCCESS, WARNING
When this initiate list is processed, the variable next_job will be evaluated. If it is less than 1000, the initiate job NEXT_JOB executes. Next, the variable run_report is evaluated to see if it equals "true". If it does, then the initiate job REPORT executes. Finally, the job "FINISHED" will execute if the job completes with either a SUCCESS or WARNING status.
JOB_1, IF job_set .eqs. complete
JOB_2
JOB_3, IF node .eqs. run, IF job_set .eqs. complete
A job with this prerequisite list has three prerequisites that must successfully complete before it can run. JOB_1 must complete successfully and the variable job_set must be equal to 3. JOB_2 has no condition connected to it and must only complete successfully. JOB_3 must complete successfully with variable node equal to "run" and job_set equal to "complete". When the job completes it checks first to see if the variable "MODE" is equal to 3. If it is the prerequisite JOB_1 must have finished successfully. Next, JOB_2 will execute automatically. Finally the variable MODE is checked to see if it equals 3 or 4. If it does, JOB_3 must have finished successfully.