Use FILTER to track jobs and started tasks not submitted by CA Scheduler Job Management

Document ID : KB000027072
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 

CA Scheduler can track both jobs and started tasks submitted outside the control of CA 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 CA 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 CA Scheduler have predecessors of these external jobs and started tasks by using the MVS criteria keyword.

 

Instructions: 

Here is a sample of a filter definition. CA Scheduler will track all jobs (not started tasks) that starts with the jobname of PAY12 and that execute in system XE88. It will also mark the job failed if the job ends with a non-zero condition code.

------------------- CA-SCHEDULER R11  (SCS1-XE88) FILTER ------
COMMAND ===>                                                        
                                                                   
Filter: PAYROLL                                                     
                                                                    
Masks:                                   Equal:                     
  Job  . . . . . . . PAY12*                 YES                     
  Accounting . . . . *                      YES                     
  Programmer . . . . *                      YES                     
  Userid . . . . . . *                      YES                     
  Sysid. . . . . . . XE88                   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 SCS1-XE88) COMMAND OUTPUT --
 COMMAND ===>                                                  SCROLL
********************************* Top of Data **************
SC DISPLAY FILTER                                                    
CACM054I EXTERNAL JOBS TRACKED IF:                                  
CACM054I FILTER NAME: PAYROLL               
CACM054I           JOB      EQ PAY12*       
CACM054I           ACCOUNT  EQ *            
CACM054I           PRGNAME  EQ *            
CACM054I           USERID   EQ *            
CACM054I           SYSID    EQ XE88         
CACM054I           CLASS    EQ *            
CACM054I           TYPE     EQ J            
CACM054I ------------------------------

Jobs or schedules can now be defined with a criteria of MVS PAY12XX (jobname PAY12*). This allows a job or schedule to wait on a predecessor job of PAY12XX that ran on XE88 which was not submitted by CA 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    = (MVSSP3B)   NJE NODE(S) TO NOTIFY OF JOB EVENTS

Your filter definition will look like this:

Filter: PAYROLL                                       
                                                                    
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 . . .  MVSSP3B . .          . .          . .                 
       . . .          . .          . .          . .

When CA 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.

Of course, the DEFINE FILTER, REFRESH FILTER, DISPLAY FILTER, ALTER FILTER AND DELETE FILETER can be defined in batch as referred to in the CA Scheduler Command Reference Guide.