Knowledge Base > Automation Engine and Target Systems > z/OS > External Job Monitor

External Job Monitor

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 agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host.

The external Job Monitor runs as an independent started taskAn executable object that is running. Tasks are also referred to as activities..

Function of the External Job Monitor (EJM)

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 jobAn Automation Engine object type for a process that runs on a target system. 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 objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task.

Not every job end requires an actionActions are predefined building blocks for recurring activities. They are commonly used for managing third party systems or in deployment scenarios.. 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.

SMF Exit

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.

Filter File

The EJM filter file is necessary to select the relevant ending jobs. The individual filter criteria are immediately checked whenever an eventAction that is triggered if particular conditions apply. It can be an Automation Engine object type or an entry in a Policy Orchestrator EventBase. 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 charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of 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 codeThe value that represents the result of tasks and script functions. 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, userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management. 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

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH