The external Job Monitor (EJM) can be used to identify jobs that were started by a scheduling system other than AE (e.g., OPC, CA7). You can react to these jobs in the AE system using the Event Monitor and the AE agent.
The external Job Monitor runs as an independent started task.
A reaction to external events is possible through the Event Monitor.
The Event Monitor identifies Console events, automatic FileSystem events and the end of z/OS jobs. The Event Monitor can also be used to react to the generation of external files. As soon as the external Job Monitor identifies an external job end, it creates a file, thereby enabling a reaction through the Event Monitor. The Event Monitor communicates with the AE system via the agent and triggers an Event object.
Not every job end requires an action. You can use a filter file to determine the jobs or steps that require a reaction. If the end of an affected job has been identified, the EJM creates a temporary file. This file is only required for the generation of an SMF record to which the Event Monitor can react. It can be deleted afterwards.
Note that the creation and deletion of files leads to entries in the dataset catalog. Make sure to reorganize it regularly.
It is possible to identify external jobs within a Sysplex if an external Job Monitor and an Event Monitor instance run on each LPAR (local partition). Each LPAR has its own SMF subsystem which is not sysplex-able. The agent does not require SMF and can be used sysplex-wide. There is no direct connection between EJM and EM. The EJM signals to the EM that a job has ended by generating a file. The EM sends the data to the z/OS agent across LPARs.
Events and information concerning the external Job Monitor should be written to the CADS via an SMF Exit (same procedure as in EventMonitor). Doing so requires a new SMF Exit (AEEXJM). This Exit behaves similarly to the Event Monitor SMF Exit with the exception that it only collects type 30 records. The SMF Exit module will automatically be loaded when the external Job Monitor module starts. The SMF Exit continues collecting events even if the EJM has been ended. A message is written to the log file if a job that has been specified in the filter file finishes in the meantime.
You can use the existing program CADSDEL as emergency recovery for the EJM.
Problems can occur if you use a filter file of the same content in several LPARs. For example, jobs of the same name can end on different LPARs at the same time. In this case, the system attempts to generate files of the same name in parallel which eventually leads to an error. As this error hardly ever occurs, the utility only writes an error message to the log file and continues.
The EJM filter file is necessary to select the relevant ending jobs. The individual filter criteria are immediately checked whenever an event occurs.
Example: A filter file contains a condition referring to a particular Step/ProcStep. The ending of this Step is immediately identified and not only when the job has ended. The filter file contains the following selection criteria:
The filter file must include the DCB attributes RECFM (record format)=FB, LRECL (record length) =85 and BLKSIZE (block size) =5120. The filter file includes an 85-character line for each filter.
Use the following command to reload the filter file manually:
MODIFY <Name of the STC>, RELOAD
(STC = started task)
Filter criterion | Digits | Description |
---|---|---|
Job name | 1-8 (Length 8) | Filter for the job's name in z/OS. The wildcard characters "*" and "?" are allowed. |
Step name | 9-16 (Length 8) | Optional Filter for the job's step name in z/OS. The wildcard characters "*" and "?" are allowed. |
ProcStep name | 17-24 (Length 8) | Optional Filter for the job's procedure step name in z/OS. The wildcard characters "*" and "?" are allowed. |
Job end | 25 (Length 1) | " " -> Check immediately at Step/ProcStep end. "X" -> Check at job end. No RC verification. "N" -> Check at job end and when the job ends normally (i.e. with a return code between 0 and 4095). "A" -> Check at job end and when the job ends abnormally (i.e. with a return code between 4096 and 12287). |
Job return code | 26-41 (Length 16) | Optional Filter for the job's return code (condition codes, user abends and system abends). Several return codes can also be specified; separate them with the character ";" or ",". Ranges can be defined using the character "-". |
File name | 42-85 (Length 44) | File name of the temporary file to be generated for redirection. |
The example shown below illustrates the usage of a job filter dataset:
JOBTEST STEP3* 0-100;S0C4 JOB.ZUC800A1.EJM.TRIGGER.TEMP01
JOBF* STEP01 N0,4,8,12-16 JOBF.ZUC800A1.EJM.TRIGGER.TEMP02
JOBTEST2DUMMY 0-4096 JOB.ZUC800A1.EJM.TRIGGER.TEMP03
JOBTEST2DUMMY2 N0-4096 JOB.ZUC800A1.EJM.TRIGGER.TEMP04
The individual filter lines are connected through an OR relation. Thus, the lines are processed and checked in sequences. If a selection applies, the particular file will be created.
See also:
Event Monitor
Structure of the External Job Monitor's Configuration File