Scheduler can track both jobs and started tasks submitted outside the control of Scheduler with the use of FILTER definitions. Previous releases used the CAIJ$MVS macro with the limitation of tracking only jobs and requires a recycle of Scheduler. Using FILTER is the highly recommended method because new FILTER definitions can be dynamically added and filter record matches can be made on more fields such as the job name, accounting information, programmer name, execution class, SYSID, user ID, or any combination of these fields.
FILTERS are normally used when jobs and schedules in Scheduler have predecessors of these external jobs and started tasks by using the MVS criteria keyword.
Release: 11.0
Component: Scheduler Job Management
Here is a sample of a filter definition. Scheduler will track all jobs (not started tasks) that starts with the jobname of MYJOB and that execute in system SYSA. It will also mark the job failed if the job ends with a non-zero condition code.
------------------- CA-SCHEDULER R11 (SCHD-SYSA) FILTER ------ COMMAND ===> Filter: MYFILTER Masks: Equal: Job . . . . . . . MYJOB* YES Accounting . . . . * YES Programmer . . . . * YES Userid . . . . . . * YES Sysid. . . . . . . SYSA YES Class. . . . . . . * YES Type . . . . . . . J (J, S, or *) Failure: Fail Code . . . . 0001 (0=no test, 1-4095) Fail Operator . . GE (GE, GT, EQ, NE, LT, LE) Inform JES Nodes: Node . . . . . . . . . . . . . . . . . .
Once a filter is defined, a refresh command using SC REFRESH FILTER is necessary to update the list of Filter Definitions in storage. Then a Display filter should be done to ensure that the filter is activated as shown below.
--------------- CA-SCHEDULER R11 (SCHD-SYSA) COMMAND OUTPUT -- COMMAND ===> SCROLL ********************************* Top of Data ************** SC DISPLAY FILTER CACM054I EXTERNAL JOBS TRACKED IF: CACM054I FILTER NAME: MYFILTER CACM054I JOB EQ MYJOB* CACM054I ACCOUNT EQ * CACM054I PRGNAME EQ * CACM054I USERID EQ * CACM054I SYSID EQ SYSA CACM054I CLASS EQ * CACM054I TYPE EQ J CACM054I ------------------------------
Jobs or schedules can now be defined with a criteria of MVS MYJOBXX (jobname MYJOB*). This allows a job or schedule to wait on a predecessor job of MYJOBXX that ran on SYSA which was not submitted by Scheduler.
Here is a sample in converting the CAIJ$MVS jobs to Filters. From your Report Options you will get a display such as this:
CAIJ$MVS (NON-SCHEDULED JOBS) OPTIONS (LOADED FROM DISK) MASK = CB????XY JOB NAME MASK FAILCOD = 0004 JOB FAILED IF RC GE FAILCODE REVTRK = NO TRACK ALL JOBS EXCEPT THIS MASK NODE = (NODEABC) NJE NODE(S) TO NOTIFY OF JOB EVENTS
Your filter definition will look like this:
Filter: MYFILTER Masks: Equal: Job . . . . . . . CB????XY YES Accounting . . . . * YES Programmer . . . . * YES Userid . . . . . . * YES Sysid. . . . . . . * YES Class. . . . . . . * YES Type . . . . . . . J (J, S, or *) Failure: Fail Code . . . . 0004 (0=no test, 1-4095) Fail Operator . . GE (GE, GT, EQ, NE, LT, LE) Inform JES Nodes: Node . . . NODEABC . . . . . . . . . . . . . . .
When Scheduler receives a JOBINIT event, the filter definitions in storage are searched in alphabetical order by filter name. The first filter definition that causes the job or task to be tracked is used.
The DEFINE FILTER, REFRESH FILTER, DISPLAY FILTER, ALTER FILTER, and DELETE FILTER can be done in batch mode. See the Scheduler Command Reference Guide for the complete syntax.