Defining and Managing End-of-Job (EOJ) Checking and Actions

#### Search Results

Search

# Defining and Managing End-of-Job (EOJ) Checking and Actions

This section provides general information on end-of-job (EOJ) checking and actions that are triggered after a job has been completed. It also describes corresponding online functions that are available for maintaining job master definitions as well as active job definitions.

- End-of-Job (EOJ) Checking and Actions - General Information

- Maintaining End-of-Job Events and Actions

- Adding and Modifying an Event Definition

- Deleting an Event Definition

- Operating System Dependent Defaults for Event Checking

- Creating and Viewing Online Documentation for Events

- Examples of Event Definitions

- Handling End-of-Job Actions

- End-of-Job Actions after Execution as a Temporary Dummy Job

- Defining Output Condition Actions

- Defining Actions for Symbol Value Modification

- Defining Actions for Modifying Job Variable Values

- Defining Action User Exits

- Defining Other Actions: Deactivate Job Automatically

- Defining Network and Job Activation Actions

- Defining Recovery Actions

- Defining SYSOUT Actions

- Defining Notification Messages

- Defining Release Actions for Kept Resources

#### Related Topics:

- Passing Files to Entire Output Management.

- For conceptual information, see Events and Actions: End-of-Job Checking in the Concepts and Facilities documentation.

## End-of-Job (EOJ) Checking and Actions - General Information

Defining End-of-Job checking and actions means instructing Entire Operations what actions to trigger after a job has terminated. The triggered action is referred to as an End-of-Job action.

End-of-Job checking and actions consists of two steps:

1. Analysis of job results (determination of End-of-Job status);

2. Triggering of appropriate system actions.

The End-of-Job action depends on the status of the whole job or any other event which can be checked by Entire Operations on termination. The status of the job on termination is determined by the occurrence of certain events during job execution which Entire Operations can check.

Before Entire Operations can check for an event, it must be defined to the system, together with instructions as to the action to be triggered. If no events are specified, Entire Operations performs End-of-Job checking automatically using system defaults.

The following topics are covered below:

- Events

- Event Check Method

- Possible End-of-Job Actions

### Events

In the terminology of Entire Operations, an event is the occurrence of a defined situation which is recognized during the End-of-Job analysis. Entire Operations automatically triggers system action, depending on the occurrence of events during job processing.

If you do not specify any event, Entire Operations provides a default event expressed as `job OK` or `job not OK`, depending on whether a received condition code is greater or less than a default condition code, or, for BS2000, whether certain system messages are received.

Some examples of possible defined events are:

- Exit code of a UNIX job equals 2;

- STEP2 of JOB1 ends with a condition code greater than 8;

- No job step ends with a condition code greater than 0;

- A defined message appears in the job SYSOUT;

- A database or file contains or does not contain certain expected data;

- The result of a user exit (expressed by its return code).

- A job variable contains certain expected data (BS2000).

### Event Check Method

Events are checked on a check `OK`/`not OK` basis. End-of-Job actions can be triggered by:

- the result of a single event check (for example, a job step checking in z/OS);

- the result of all End-of-Job checks (including the default checks), which always causes either the event `job OK` (All Checks ok) or `job not OK` (Any Check not ok) to occur.

Both event definitions are always predefined for every job.

In the latter case, you can define two sets of actions:

- one set is performed if all checks finished `OK` (All Checks ok, i.e., `job OK`);

- the other is performed if at least one check finished `not OK` (Any Check not ok, i.e., `job not OK`).

All Checks ok and Any Check not ok are mutually exclusive parameters to be checked.

All events can be combined as required. You can specify up to 30 different event checks for a job.

This section covers the following topics:

- End-of-Job Checks for Operating Systems and Job Types
- Job SYSOUT Check
- Retrying End-of-Job Checking

#### End-of-Job Checks for Operating Systems and Job Types

The following table provides an overview of the availability of End-of-Job checks for the supported operating systems and job types:

End-of-Job Check | z/OS | BS2000 | UNIX | Windows |
--- | --- | --- | --- | --- | ---
Termination Codes | * |  |  |  |
Job Variables |  | * |  |  |
User Exit | * | * | * | * |
String Search | * | * | * | * | *
User Switch |  | * |  |  |
Exit Code |  |  | * | * |

An asterisk (`*`) indicates that the End-of-Job check is available for the operating system or job type. These checks are described later in this section.

#### Job SYSOUT Check

- On z/OS: The job result check will be retried by the Monitor up to 10 times, when the message `Job disappeared from Spool Queue` appears.

  The wait interval between SYSOUT read attempts is constantly at least 30 seconds (not to be confused with the Monitor wait time, because it may be very short).

- On BS2000: Entire Operations can only check job SYSOUT if it is assigned to a file. JCL of jobs that are to run under Entire Operations control must therefore not contain SYSOUT assignments to `*dummy`, `primary` or to a temporary file, otherwise no End-of-Job checking is possible.

See also Defining SYSOUT Actions.

#### Retrying End-of-Job Checking

For the operating system z/OS the following applies:

- In case of incomplete SYSOUT, the SYSOUT reading will be retried 10 times, with intervals not shorter than 30 seconds. Interval can be longer if the monitor task wait time is longer.

### Possible End-of-Job Actions

End-of-Job actions refer to all actions performed after termination of a job. These actions can be performed automatically by Entire Operations or manually by the user.

All End-of-Job actions can be defined for an event (job step) or at the job level.

For each of the user-specified or default events, you can define how Entire Operations is to act.

Possible End-of-Job actions are:

- Set/reset output conditions to continue the job flow.

  See Defining Output Condition Actions.

- Set/modify symbol values.

  See Defining Actions for Symbol Value Modification.

- Release resources held by a job.

  See Defining Release Actions for Kept Resources.

- Set/reset/modify job variables (BS2000 only).

  See Defining Actions for Modifying Job Variable Values.

- Execute End-of-Job action user exits.

  See Defining Action User Exits.

- Deactivate job.

  See Defining Other Actions: Deactivate Job Automatically.

- Activate other job networks or single jobs.

  See Defining Network and Job Activation Actions.

- Start job recovery.

  See Defining Recovery Actions.

- Handle job SYSOUT data.

  See Defining SYSOUT Actions.

- Pass output files to Entire Output Management.

  See Passing Files to Entire Output Management.

- Send message to user or console with information about any abnormal event or pending condition.

  See Defining Notification Messages.

Only one action of the same type can be defined for an event (except in the case of output conditions). If you need several actions of the same type for the event `job OK` or `job not OK`, you can define these by adding an Add. Job-ok, Job-not-ok event (event type `A`).

## Maintaining End-of-Job Events and Actions

To maintain End-of-Job events and actions defined for a job

- On the Job Maintenance screen, type `O` in the line command field next to the required job and press ENTER.

  Or:
  Enter the direct command `LIST JOB` as described in the Direct Commands documentation.

  An End-of-Job Checking + Actions screen like the example below appears:

       18-03-06                ***** Entire Operations *****                17:38:49
       Owner SAGTEST    Network SAGNET     Version                     Job JOB-EOJ
       End-of-Job Checking + Actions  MVS/ESA               Run       Date
       ------------------------------------------------------------------------------
       C Action       Step       will be checked for                         means OA
       _                         Missing String 'ERROR'                       ok
       _          U   ANYSTEP    Condition Code >  C0008                      n.ok

       ******************************* Bottom of Data *******************************
       _ AC           All Checks ok
       _              Any Check not ok
       ------------------------------------------------------------------------------
       A Activat. B Browse C Cond. D Delete E Ed.Exit J JV L Rel Res M Modify O Other
       P Descr. R Recov. S SYSOUT T Output Mgmt U User Msg X Action Exit Y Symbol Set

       Command => ____________________________________________________________

      Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
            Help  Add   End         Save        Up    Down                    Menu

  The screen lists all End-of-Job actions and events defined for the selected job.

  The columns, line commands and special PF keys available on the screen are described in the relevant sections.

This section covers the following topics:

- Columns and Rows: End-of-Job (EOJ) Checking and Actions

- Line Commands/Action Indicators: End-of-Job Checking + Actions Window

- Special PF Keys: End-of-Job (EOJ) Checking and Actions

### Columns and Rows: End-of-Job (EOJ) Checking and Actions

The End-of-Job Checking + Actions screen provides the following columns:

Column/Row | Description
--- | ---
C | One-character input field for line commands: see Line Commands: End-of-Job Checking + Actions Window.
Action | Summary of defined actions for the event. Each character listed in this column represents an action defined for the event. All characters possibly shown here correspond to the line commands available: see Line Commands/Action Indicators: End-of-Job Checking + Actions Window.
Step | Applies to z/OS only. Step name in JCL (`ANYSTEP` means all steps).
will be checked for | Event to be checked (condition code, system code, user abend code, system message, etc.).
means | Event status after the check:
`ok` | All checks ended OK.
`n.ok` | At least one check ended not OK.
`--` | Event has no influence on the job result. Corresponds to an empty field.
See also Handling End-of-Job Actions.
OA | This column only contains entries if an event occurred during job execution. The entries under O indicate the status of the event check, the entries under A indicate whether the action defined for the event was performed:
Entry | O | A
blank | Event was not checked. | No action performed.
`-` | Event did not occur. | n/a
`+` | Event occurred. | Action performed.
`E` | Error occurred during event check. | One or more actions performed erroneously.
`M` | Event definition was modified. | Action definition was modified.
`E` | Error occurred during the event check. | One or more actions failed.

### Line Commands/Action Indicators: End-of-Job Checking + Actions Window

The line commands on the End-of-Job Checking + Actions screen are used to maintain events and define the actions to be triggered.

The line commands listed in the following table correspond to the character(s) in the Action column. For example: `PSU` indicates that a description (`P`), a SYSOUT action (`S`) and a notification message (`U`) have been defined for the event.

Line Command/ Action Indicator | Description
--- | ---
`A` (Activat.) | Open the Network/Job Activation window to activate a job or job network when the associated event occurs.
`B` (Browse) | Display the selected event definition in read-only mode.
`C` (Cond.) | Open the Output Conditions window to define or modify the condition to be set or reset when the associated event occurs.
`D` (Delete) | Delete an event definition.
`E` (Ed.Exit) | Open the editor to create or modify a checking user exit to be executed when the selected event occurs. (The editor for action user exits opens differently: see To add, view or change an action user exit definition.)
`J` (JV) | Open the Job Variable Modification window to define a job variable (BS2000 only).
`L` (Rel Res) | Open the Release Kept Resource window to release a resource kept by another job.
`M` (Modify) | Modify an event definition. See Adding and Modifying an Event Definition.
`O` (Other) | Open the Other Actions window to define other actions and deactivate a job automatically.
`P` (Descr.) | Open the editor screen to create, view or modify text that describes an event. See also Creating and Viewing Online Documentation for Events.
`R` (Recov.) | Open the Recovery Definition window to define a recovery action to be taken if the associated event occurs (normally, job failure).
`S` (SYSOUT) | Open the SYSOUT Actions window to define job SYSOUT actions to be taken on job completion if the associated event occurs.
`T` (Output Mgmt) | Pass single or multiple files to Entire Output Management for further processing after job completion. For detailed information, see the section Passing Files to Entire Output Management.
`U` (User Msg) | Open the Message and Message Recipients window to define a message to be sent if the associated event occurs.
`X` (Action Exit) | Open the Execute EOJ Action Exit window to define an action user exit to be executed on job termination if the associated event occurs. See Defining Action User Exits.
`Y` (Symbol Set) | Open the Symbol Setting window to modify a symbol or a symbol setting.

Note
The line commands `B` (Browse), `D` (Delete), `E` (Edit), `M` (Modify) and `O` (Other) are event maintenance commands, and therefore available at the event level only. All other line commands are also available at the job level according to All Checks ok and Any Check not ok.

### Special PF Keys: End-of-Job (EOJ) Checking and Actions

On the End-of-Job Checking + Actions screen, you can perform the following function using this special PF key:

PF Key | Name | Function
--- | --- | ---
PF2 | Add | Open the Add Event Definition window to define a new event: see Adding and Modifying an Event Definition.

## Adding and Modifying an Event Definition

To add an event definition

1. Choose PF2 (Add) on the End-of-Job Checking + Actions screen.

   Depending on the operating system of the execution node specified for the job in the Job Definition, an Event Definition window like the example below opens:

       +---------------------------------------------------------------------+
       |                                                                     |
       |                 Add Event Definition                                |
       |                                                            BS2000   |
       |    Event Type ==> _  R  Exit             J  Job special event       |
       |                      S  String           A  Add. Job-ok, Job-not-ok |
       |                      U  User Switch                                 |
       |                      V  Job Variable                                |
       |                                                                     |
       |  Exit ==> ________ in Natural Library ==> ________ Exit Mode ==> _  |
       |                                                                     |
       |  String  ==> ______________________________        missing ==> _    |
       |  in File ==> ______________________________________________________ |
       |                                   (Optional) Read Password ==>      |
       |                                                    defined ==> no   |
       |  User Switch  ==> 0_ of BS2000 User ID ==> ________                 |
       |                                                                     |
       |  Occurrence of event means OK or NOT OK ==> __                      |
       |                                                                     |
       | Enter-PF1---PF2---PF3-----------PF5-------------------------------- |
       |       Help  Add   End           Save                                |
       +---------------------------------------------------------------------+

2. Enter the values required to define the event. All input fields are explained in Fields: Event Definition Window.

   When you are finished, choose PF5 (Save) to save your entries.

   A success message informs you that the event definition has been added.

3. If you do not want to define another event, choose PF3 (End) to close the window and return to the End-of-Job Checking + Actions screen.

   The new event is now listed on the screen.

   Or:
   If you want to define another event, leave the window open and choose PF2 (Add).

   The window is cleared and you can enter the values required to define the next event.

To modify an event definition

1. On the End-of-Job Checking + Actions screen, type `M` in the line command field of the selected event, and press ENTER.

   An Event Definition window opens with the current event definition.

2. Modify the values as required. The input fields are explained in Fields: Event Definition Window.

3. Choose PF5 (Save) to save your changes.

This section covers the following topics:

- Fields: Event Definition

### Fields: Event Definition

This section describes the fields contained in the Event Definition window.

Note
The fields available to define an event depend on the operating system of the execution node and the Event Type selected for the job. This is also indicated in the table below.

Field | Description
--- | ---
Event Type | A - Add. Job-ok, Job-not-ok: Additional definition for All Checks ok or Any Check not ok to execute multiple End-of-Job actions of the same type. This event is required to define several actions of the same type for the event `job ok` or `job not ok`. Note You can use these additional event definitions to set conditions, but it is not recommended, because they are not evaluated for the display of job dependencies. See also Handling End-of-Job Actions and Example of an Additional Job OK/not OK Event (Event Type A).
(z/OS only) C - Termination Code: Termination code received during job execution (job step). For possible values, see the field Termination Code field. See also Example of a Termination Code Event (Event Type C).
(BS2000, UNIX and Windows only) J - Job Special Event: Special event during job execution. When such an event occurs this always means `Job not ok`. This event occurs if an operating system abend or hardware failure occurs during job execution. This is always used when a job did not run on LOGOFF (job ended normally) or ABEND (job interrupted with error). The defined actions are taken after the start of the Monitor. Valid input value: `JIR` (Job execution interrupted.) See also Example of a Job Special Event (Event Type J).
R - User Exit: Job SYSOUT is to be checked by a user exit. See also Example of a User Exit Event (Event Type R).
S - String: Occurrence of a specific string in the job SYSOUT or a specified file. See also the field String and Example of a String Event (Event Type S).
(BS2000 only) U - User Switch: Event depends on a user switch. See also Example of a User Switch Event (Event Type U).
(BS2000 only) V - Job Variable: Event depends on the contents of a job variable. If you enter `V`, a window opens where you can enter the job variable definition. The input fields available to define a job variable are explained in Fields: Job Variable Definitions (BS2000 only). See also Example of a Job Variable Event (Event Type V).
(UNIX and Windows only) X - Exit Code: Exit code check. The result of the event comes from the exit code of a script under UNIX or Windows or from the exit code of a program executable under Windows. Specify a logical operator and an exit code to compare the received exit code with the specified values. Note A standard check for the exit code can be defined in the Entire Operations defaults. If a SYSOUT file read error occurs while the Monitor is trying to read the exit code from the job SYSOUT, this error is treated as a temporary error. The Monitor attempts to read the exit code up to 10 times. The time between the attempts is equal to the Monitor wait time. If there is still no success after 10 attempts, the job is set to the `status permanent` error. See also Example of an Exit Code Event (Event Type X).
Occurrence of event means OK or NOT OK | Specifies the event check status if the defined event occurs. Possible values:
`OK` | Check `OK`.
`NO` | Check `not OK`.
empty field | No effect on the job result.
See also Handling End-of-Job Actions.
Stepname (z/OS only) | (z/OS and z/VSE only) JCL step to be checked for the return code specified in the Operator and Event Type fields. Special step names:
`ANYSTEP` (or `/ANYSTEP`) | Event occurs if the definition is true for any step of the jobs.
`MAXCC` (or `/MAXCC`) | Event occurs if it is true for the maximum termination code (condition code) of the job.
See also Example of a Termination Code Event (Event Type C).
Operator (z/OS only) | (z/OS only) Specifies the logical operator used to compare the received return code with the value entered in the Termination Code field. See also Example of a Termination Code Event (Event Type C).
Termination Code (z/OS only) | (z/OS only) Specifies the termination condition to be compared with the return code. Possible values:
`Cxxxx` | 5-character condition/return code
`Uxxxx` | 5-character user abend code (z/OS only).
`Sxxxx` | 5-character system abend code (z/OS only).
`JDL` | Job deleted by operator.
`JFL` | Job failed, JCL error. Note If this event occurs and a `JFL` event definition with `OK` exists, this can be treated as `OK`.
`JIR` | Job execution interrupted, for example, system crash (z/OS only).
`JNC` | Not cataloged (compiled) error (z/OS only).
`JNR` | Job not run, JCL error Note If this event occurs and a `JNR` event definition with `OK` exists, this can be treated as `OK`.
See also z/OS Defaults for Event Checking and Example of a Termination Code Event (Event Type C).
Exit | Name of the End-of-Job checking user exit which is to run on job termination. Note Entire Operations performs an Entire System Server logon to the job’s execution node with the job’s submit user ID prior to the execution of the exit. To display a selection list of user exits, first enter the name of a Natural library in the in NAT Library/in Natural Library field, then enter an asterisk (`*`) in the Exit field and press ENTER. Depending on your permissions, you can edit or delete a checking user exit with the line command `E` or `D`, respectively, on the End-of-Job Checking + Actions screen. See also: Example of a User Exit Event (Event Type R). User Exits for End-of-Job Checking and Actions in the section User Exits and
in Natural Library or in NAT Library | Name of the Natural library which contains the required user exit. This library should be different from the Entire Operations system library. See also Example of a User Exit Event (Event Type R).
Exit Mode | Possible values
empty field | User exit is executed synchronously (default).
`A` | User exit is executed asynchronously (in a Natural task). See also Asynchronous Exit Execution in the Installation and Setup documentation.
String | Specify the string to be searched for in SYSOUT or any defined file. If the string is found, the event occurs. The following applies: All checks of the SYSOUT file and actions which refer to the SYSOUT file are not executed if no SYSOUT file is available. This case only applies if the job is submitted as a temporary dummy job. A string search in a non-existent file is handled like `string not found` in an existing file. The search string may contain symbols. Symbols with activation escape characters are replaced at job activation time. If the string contains the activation escape character, a symbol replacement is performed (from the active symbol table). The updated string is stored in the active database. Symbols with submission escape characters are replaced at End-of-Job checking time. The symbol remains in the field, so that it will be replaced again during an eventual job re-submission. Missing symbols cause a permanent activation error or permanent End-of-Job checking error. Note for BS2000 and UNIX: If the search string contains at least one blank at the beginning, in the middle or at the end, it must be enclosed in quotes. For example:
    '    leading blanks'
See also Example of a String Event (Event Type S).
missing (string) | String missing. Possible values:
empty field | The event occurs if the string is found (default).
`Y` | The event occurs if the string is not found.
Select (string) (z/OS only) | (z/OS only) z/OS: You can limit the search for strings by specifying file numbers in this field according to the file type (`SM`, `SO`, `JL` and `CC`). Enter the file type followed by a number, a range of numbers or an asterisk (`*`) as a wildcard. For example:
`SM 1` | Search system messages 1.
`SM 1:5` | Search system messages 1 to 5.
`SO *` | Search in all SYSOUT files.
`CC 1` | Search condition codes 1.
See also Example of a String Event (Event Type S).
in File (string) (BS2000, UNIX and Windows only) | (BS2000, UNIX and Windows only) Name of the file to be scanned for the specified search string. You may have to supply a user ID and a password with the file name. Symbol replacement is possible for the file name or any part of it: with activation escape - once at activation time. If the file name contains the activation escape character, a symbol replacement is performed (from the active symbol table). The updated file name is stored in the active database. with submission escape - during EOJ checking. The symbol remains in the field, so that it will be replaced again during an eventual job re-submission. If you leave this field blank, Entire Operations searches for the string in the SYSOUT collection file created by the Entire Operations Monitor. Symbol replacement is possible. The submission escape character is to be used.
in File if temp. Dummy (string) (BS2000, UNIX and Windows only) | (BS2000, UNIX and Windows only) Specifies whether to perform the string search for temporary dummies. Possible values:
`Y` or blank | The string search is always performed (default).
`N` | The string search is only performed if the job is not executed as a temporary dummy.
(Optional) Read Password (string, job variable) (BS2000 only) | (BS2000 only) Alphanumeric password for a defined job variable or a password-protected file (optional). A password-protected file is indicated by yes in the defined field.
User Switch ... of BS2000 User ID ... (BS2000 only) | (BS2000 only) Enter a valid BS2000 user switch in the range from `0` to `31` and the BS2000 user ID of the user switch. See also Example of a User Switch Event (Event Type U).

> Fields: Job Variable Definitions (BS2000 only)

>   The fields in the Event Definition: Job Variable Checking window are explained in the following table:

>   Field | Description
>   --- | ---
>   Job Variable | Name of a valid BS2000 job variable. If the job variable is specified without an explicit user ID, the job default BS2000 user ID is used as a prefix. Symbol replacement is performed in the name if the name contains the activation escape character at least once. Symbol replacement is possible. The submission escape character is to be used.
>   at Position | Position of the substring of the job variable value to be checked. Possible values: 1 to 253.
>   in Length | Length of the substring of the job variable value to be checked. Possible values: `1` to `253`.
>   with Format | Format in which the substring of the job variable value is to be checked against the `comparison-string`. Possible values:
>   `A` | alphanumeric
>   `N` | numeric
>   is | Logical operator to be used for comparison of the defined BS2000 substring of the job variable value against the `comparison-string`.
>   input lines for `comparison-string` | Enter the string or field to be compared with the substring of the job variable value. The strings are compared in the defined format. The content of this field is compared with the substring of the job variable value, or it is inserted into the substring of the job variable value. The comparison is made in the defined format. Symbol replacement is possible. The submission escape character is to be used.
>   (Optional) Read Password | (Optional field) If the job variable is read password-protected, specify the password here. A password-protected file is indicated by yes in the defined field.
>   Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

>   See also Example of a Job Variable Event (Event Type V).

> Valid Comparison Operators

>   You can use one of the following comparison (relational) operators to compare two character strings and return either the value true or false:

>   Operator | Explanation
>   --- | ---
>   `=` | Equal to the specified value.
>   `EQ`
>   `>=` | Greater than or equal to the specified value.
>   `GE`
>   `>` | Greater than the specified value.
>   `GT`
>   `<=` | Less than or equal to the specified value.
>   `LE`
>   `<` | Less than the specified value.
>   `LT`
>   `<>` | Not equal to the specified value.
>   `NE`

## Deleting an Event Definition

To delete an event definition

1. On the End-of-Job Checking + Actions screen, type `C` in the line command field of the selected job and press ENTER.

   A window prompts you to confirm the deletion.

2. Enter `Y` (Yes) and press ENTER to confirm the deletion and close the window.

   Or:
   Choose PF3 or press ENTER to cancel the deletion and close the window.

Note
The `D` line command is available only at the event level. Deletion of an event also deletes all associated definitions made via the End-of-Job Checking + Actions screen (action for the event, etc.).

## Operating System Dependent Defaults for Event Checking

This section covers the following topics:

- Common Defaults for Event Checking

- z/OS Defaults for Event Checking

- BS2000 Defaults for Event Checking

- UNIX and Windows Defaults for Event Checking

### Common Defaults for Event Checking

- Symbol replacement error during job submission:

  If a symbol replacement error occurs at submission time, the event `JNR` (`job not run JCL error`) is set to `occurred`.

  If the event `JNR` is not defined, it is added to the active job.

- If a string defined in the Global Message Code Table (see the Administration documentation) is found anywhere in the SYSOUT, its severity equivalent is compared with the highest condition code value accepted as `OK`. The job is `not OK` if the severity equivalent is higher than this default.

### z/OS Defaults for Event Checking

If no events are defined for a job, Entire Operations provides a default check of the return code type (for termination codes/event type C):

- If a system code that is not equal to `0` (zero) has occurred at any job step, the job is evaluated as `not OK` if this event is not explicitly defined. This also applies if an event has occurred which has been defined using `ANYSTEP`. The occurrence of such an event has the priority over definitions, which apply for any steps.

- You can set the default for how to treat the message `IEF201I job terminated` if it occurs. The appropriate option in the Defaults for z/OS (see the Administration documentation) determines whether to treat this message as `not OK`. If treated as `not OK`, a log is written, and the job is set to the status `Job interrupted`. If treated as `OK`, the occurrence of IEF201I in SYSOUT has no consequences and the job continues.

- If the message `IEF287I data set not cataloged` is received, it is written to the log and the job is treated as `not OK`.

- If a condition code or user code, which is not explicitly defined, is received at any job step, it is compared with the highest value accepted as `OK`. The job is `not OK` if the code is higher than this default. The job is also `not OK` if no explicit check has returned an `OK`. For more information, see the Defaults for z/OS option.

- Events like JCL error, Job not run and Job interrupted cause the status `not OK` by default. Dedicated event definitions can override this.

- In all other cases, the job is accepted as `OK`.

- Precedence of event checks:

  - If a `MAXCC` or `ANYSTEP` check has been defined and this event occurs, no check is done on the highest value accepted as still `OK`.

  - `MAXCC` precedes `ANYSTEP`.

### BS2000 Defaults for Event Checking

Entire Operations either uses a defined Monitor job variable for a job or creates its own job variable if job variables are available.

- If the Monitor job variable displays an abnormal end, the job is `not OK`.

- By default, if defined message keys appear, the job is regarded as faulty and is set to `not OK`. These message codes (see BS2000 Default Message Codes in den Administration documentation) are default settings which are in effect after the installation of Entire Operations. However, they can be freely adapted. It is possible to completely delete this table.

  Note
  Each time this table is modified, possibly faulty jobs may no longer be set to `not OK`.

- If messages like `program dump` appear in the SYSOUT, the job is `not OK`.

- In all other cases, the job is accepted as `OK`.

### UNIX and Windows Defaults for Event Checking

Entire Operations inserts start and end messages (EOR0301, EOR0302) in the SYSOUT.

- If the end message EOR0302 is missing, the job is treated like an interrupted job. Because it is possible that the SYSOUT of an asynchronous child process is written behind the end message, the message EOR0302 is searched in the whole SYSOUT file. If the End-of-Job checking detects that there is unexpected SYSOUT behind the end message, you cannot obtain the process times for accounting. A note is written to the log:

  `Process times for accounting not found ... SYSOUT of background processes may exist`.

- UNIX and Windows JCL frames generate the message EOR0339 if the Maximum SYSOUT Size (in MB) is exceeded:

  EOR0339 - Maximum SYSOUT Size :1: exceeded

  If this message is detected, no further End-of-Job checking and no End-of-Job actions will be performed for the job at all. As a result, a job network execution will be interrupted.

- Unix only: If the SYSOUT contains `segmentation fault` (in German: `Speicherzugriffsfehler`), the job is treated as `not OK`.

- Unix only: If the SYSOUT contains `bad interpreter` (in German: `Defekter Interpreter`), the job is treated as `not OK`.

- Unix only: If the SYSOUT contains `command not found` (in German: `Kommando nicht gefunden`), the job is treated as `not OK`.

- If no special event checking was defined for a job (UNIX and Windows), then the event is compared to a system-wide default value for UNIX or Windows. Depending on this check, the job result can be set to `not OK`.

- In all other cases, the job is accepted as `OK`.

## Creating and Viewing Online Documentation for Events

You can browse text description of active event and write or modify the text description of a master event.

To add, view or change an event description

1. On the End-of-Job Checking + Actions screen, type `P` in the line command input field next to the event for which you want to add a description or whose description you want to view or change.

   The letter P in the Action column indicates whether a description already exists for the event.

2. Press ENTER.

   An editor screen like the example of a long job description appears.

   Write or modify text using editor commands which are briefly described in the online help. For detailed descriptions of all editor commands, see Software AG Editor in the Natural documentation.

3. When you are finished, enter the editor command `SAVE` and choose PF3.

   The text is saved and the editor window closes.

Note
After you add or modify an output condition definition, a loop check is performed on the affected network. The same conditions apply as described in Checking for a Loop in a Job Network in the section Network Maintenance with one exception: if a loop is detected in the job flow, no corresponding message appears.

## Examples of Event Definitions

This section contains examples of event definitions:

- Example of an Additional Job OK/not OK Event (Event Type A)

- Example of a Termination Code Event (Event Type C)

- Example of a Job Special Event (Event Type J)

- Example of a User Exit Event (Event Type R)

- Example of a String Event (Event Type S)

- Example of a User Switch Event (Event Type U)

- Example of a Job Variable Event (Event Type V)

- Example of an Exit Code Event (Event Type X)

### Example of an Additional Job OK/not OK Event (Event Type A)

    +---------------------------------------------------------+
    !                                                         !
    !    Event Definition: Additional 'Job ok/not ok'         !
    !                                                         !
    !  This screen can be used to define an additional        !
    !  Job-ok or Job-not-ok event, to define multiple         !
    !  End-of-Job actions.                                    !
    !                                                         !
    !  The event is for OK or NOT OK ==> OK                   !
    !                                                         !
    ! Enter-PF1------PF3-------PF5---------------------       !
    !       Help     End       Save                           !
    +---------------------------------------------------------+

#### Explanation:

This example defines an additional `Job OK` event to execute another End-of-Job action of the same type.

### Example of a Termination Code Event (Event Type C)

    +--------------------------------------------------------------+
    |                                                              |
    |                   Add Event Definition                       |
    |  Event Type ==> C  C  Termination Code            MVS/ESA    |
    |                    R  Exit                                   |
    |                    S  String       A  Add. Job-ok,-not-ok    |
    |                                                              |
    |  Stepname ==> ANYSTEP_______________________                 |
    |  Operator ==> EQ   Event ==> C0003                           |
    |                                                              |
    |  Exit ==> ________ in NAT Library ==> ________               |
    |                         Exit Mode ==> _                      |
    |  String ==> ______________________________   missing ==> _   |
    |  Select ==> ________ ________ ________ ________ ________     |
    |             ________ ________ ________ ________ ________     |
    |  Occurrence of event means OK or NOT OK ==> NO               |
    |                                                              |
    | Enter-PF1---PF2---PF3-----PF5-----------------------------   |
    |       Help  Add   End     Save                               |
    +--------------------------------------------------------------+

#### Explanation:

If Condition Code 3 is received at any step (`ANYSTEP`) during job execution, the event result is `not OK`.

### Example of a Job Special Event (Event Type J)

     +-------------------------------------------------+
     !                                                 !
     !         Event Definition: Special Event         !
     !                                       BS2000    !
     !                                                 !
     !  Event ==> JIR                                  !
     !            Job execution interrupted            !
     !                                                 !
     !  The occurrence of this event always has the    !
     !  meaning 'Job not ok'.                          !
     !                                                 !
     !  Enter-PF1-------PF3--------PF5---------------  !
     !        Help      End        Save                !
     +-------------------------------------------------+

#### Explanation:

This event occurs if an operating system abend or hardware failure occurs during job execution.

`JIR` (job execution interrupted) is the only value allowed in the Event field.

### Example of a User Exit Event (Event Type R)

    +--------------------------------------------------------------+
    |                                                              |
    |                 Modify Event Definition                      |
    |  Event Type ==> R  C  Termination Code            MVS/ESA    |
    |                    R  Exit                                   |
    |                    S  String       A  Add. Job-ok,-not-ok    |
    |                                                              |
    |  Stepname ==> ______________________________                 |
    |  Operator ==> __   Event ==> _____                           |
    |                                                              |
    |  Exit ==> UE1_____ in NAT Library ==> SYSEORU_               |
    |                         Exit Mode ==> _                      |
    |  String ==> ______________________________   missing ==> _   |
    |  Select ==> ________ ________ ________ ________ ________     |
    |             ________ ________ ________ ________ ________     |
    |  Occurrence of event means OK or NOT OK ==> NO               |
    |                                                              |
    | Enter-PF1---PF2---PF3-----PF5-----------------------------   |
    |       Help  Add   End     Save                               |
    +--------------------------------------------------------------+

#### Explanation:

User exit `UE1` checks the job SYSOUT at job completion. This user exit resides in the Natural library `SYSEORU`.

### Example of a String Event (Event Type S)

Example for z/OS:

    +--------------------------------------------------------------+
    |                                                              |
    |                 Modify Event Definition                      |
    |  Event Type ==> S  C  Termination Code            MVS/ESA    |
    |                    R  Exit                                   |
    |                    S  String       A  Add. Job-ok,-not-ok    |
    |                                                              |
    |  Stepname ==> ______________________________                 |
    |  Operator ==> __   Event ==> _____                           |
    |                                                              |
    |  Exit ==> ________ in NAT Library ==> ________               |
    |                         Exit Mode ==> _                      |
    |  String ==> EXCEEDS_______________________   missing ==> _   |
    |  Select ==> SM *____ ________ ________ ________ ________     |
    |             ________ ________ ________ ________ ________     |
    |  Occurrence of event means OK or NOT OK ==> NO               |
    |                                                              |
    | Enter-PF1---PF2---PF3-----PF5-----------------------------   |
    |       Help  Add   End     Save                               |
    +--------------------------------------------------------------+

Example for BS2000:

    +---------------------------------------------------------------------+
    !                                                                     !
    !                 Modify Event Definition                             !
    !                                                            BS2000   !
    !    Event Type ==> S  R  Exit             J  Job special event       !
    !                      S  String           A  Add. Job-ok, Job-not-ok !
    !                      U  User Switch                                 !
    !                      V  Job Variable                                !
    !                                                                     !
    !  Exit ==> ________ in Natural Library ==> ________ Exit Mode ==> _  !
    !                                                                     !
    !  String  ==> ITEM531_______________________        missing ==> _    !
    !  in File ==> DEPOT-INVENTORY-MAY___________________________________ !
    !  in File if temp. Dummy ==> Y     (optional) Read Password ==>      !
    !                                                    defined ==> no   !
    !  User Switch  ==> 0_ of BS2000 User ID ==> BS2-UID1                 !
    !                                                                     !
    !  Occurrence of event means OK or NOT OK ==> OK                      !
    !                                                                     !
    ! Enter-PF1---PF2---PF3-----------PF5-------------------------------- !
    !       Help  Add   End           Save                                !
    +---------------------------------------------------------------------+

#### Explanation:

- Example for z/OS: If the string `EXCEEDS` is found in any system message (`SM *`), the event result is `not OK`.

  If you enter `NE` or `<>` in the Operator field, the event occurs if the string is not found.

- Example for BS2000: If the string `ITEM531` is found in the BS2000 file `DEPOT-INVENTORY-MAY`, the event result is `OK`.

### Example of a User Switch Event (Event Type U)

    +---------------------------------------------------------------------+
    !                                                                     !
    !                 Modify Event Definition                             !
    !                                                            BS2000   !
    !    Event Type ==> U  R  Exit             J  Job special event       !
    !                      S  String           A  Add. Job-ok, Job-not-ok !
    !                      U  User Switch                                 !
    !                      V  Job Variable                                !
    !                                                                     !
    !  Exit ==> ________ in Natural Library ==> ________ Exit Mode ==> _  !
    !                                                                     !
    !  String  ==> ______________________________        missing ==> _    !
    !  in File ==> ______________________________________________________ !
    !  in File if temp. Dummy ==> Y     (optional) Read Password ==>      !
    !                                                    defined ==> no   !
    !  User Switch  ==> 11 of BS2000 User ID ==> DC1_____                 !
    !                                                                     !
    !  Occurrence of event means OK or NOT OK ==> OK                      !
    !                                                                     !
    ! Enter-PF1---PF2---PF3-----------PF5-------------------------------- !
    !       Help  Add   End           Save                                !
    +---------------------------------------------------------------------+

#### Explanation:

The event is `OK` if user switch `11` of the BS2000 user ID `DC1` is on at job termination time.

### Example of a Job Variable Event (Event Type V)

    +--------------------------------------------------------------------+
    !                                                                    !
    !         Event Definition: Job Variable Checking                    !
    !                                                BS2000              !
    !  If Contents of Job Variable                                       !
    !  $DC1.JV.DEMO__________________________________________            !
    !  at Position 10_ in Length 20_ with Format A                       !
    !  is EQ                                                             !
    !  Result is 100___________________________________________________  !
    !  ________________________________________________________________  !
    !  ________________________________________________________________  !
    !  ________________________________________________________________  !
    !                       (Optional) Read Password ==>                 !
    !                                        defined ==> no              !
    !  The successful Check means OK or NOT OK ==> OK                    !
    ! Enter-PF1---------PF3-----------PF5--------------------            !
    !       Help        End           Save                               !
    +--------------------------------------------------------------------+

#### Explanation:

The event is `OK` if the job variable `$DC1.JV.DEMO` contains `Result is 100` at the position `10`, in the length `20`, in alphanumeric (`A`) format.

### Example of an Exit Code Event (Event Type X)

    +---------------------------------------------------------------------+
    !                                                                     !
    !                 Modify Event Definition                             !
    !                                                            Linux    !
    !    Event Type ==> X  X  Exit Code        J  Job special event       !
    !                      R  Exit             A  Add. Job-ok, Job-not-ok !
    !                      S  String                                      !
    !                                                                     !
    !                                                                     !
    !  Exit Code is ==> >_ than ==> 0___                                  !
    !                                                                     !
    !  Exit ==> ________ in NAT Library ==> ________ Exit Mode ==> _      !
    !                                                                     !
    !  String  ==> ______________________________        missing ==> _    !
    !  in File ==> ______________________________________________________ !
    !                                                                     !
    !                                                                     !
    !  Occurrence of event means OK or NOT OK ==> NO                      !
    !                                                                     !
    ! Enter-PF1---PF2---PF3-----------PF5-------------------------------- !
    !       Help  Add   End           Save                                !
    +---------------------------------------------------------------------+

#### Explanation:

The event is `OK` if an exit code greater than `0` (zero) occurs.

## Handling End-of-Job Actions

An End-of-Job action can be performed for a check event defined at the job step level and/or the default check event All Checks ok or Any Check not ok defined at the job level.

The default check events are always provided in the Bottom of Data section of the End-of-Job Checking + Actions screen.

All checks ok can be used to define actions to perform if no error occurred during job execution.

Any Check not ok can be used to define actions to perform if at least one error occurred during job execution.

This section covers the following topics:

- Defining Actions

- Removing Actions

### Defining Actions

To define an action

- For an event at the job step level:

  On the End-of-Job Checking + Actions screen, in the line command input field next to the event for which you want to perform an action, type the line command that corresponds to the action you want to define.

  Or:

  Caution

  For an overall job check at the job level:

  On the End-of-Job Checking + Actions screen, in the line command input field next to All Checks ok or Any Check not ok, type the line command that corresponds to the action you want to perform on the entire job.

  Proceed as described in the action-specific instructions in the remainder of this chapter.

  The example below shows how the same action can be defined for several purposes:

       18-03-06                ***** Entire Operations *****                12:32:15
       Owner SAGTEST    Network SAGNET     Version                     Job JOB-EOJ
       End-of-Job Checking + Actions  MVS/ESA               Run       Date
       ------------------------------------------------------------------------------
       C Action       Step       will be checked for                         means OA
       _          U              Additional Actions for Job-ok                ok
       _          U   ANYSTEP    Condition Code =  C0004                      n.ok

       ******************************* Bottom of Data *******************************
       _              All Checks ok
       _          U   Any Check not ok
       ------------------------------------------------------------------------------
       A Activat. B Browse C Cond. D Delete E Ed.Exit J JV L Rel Res M Modify O Other
       P Descr. R Recov. S SYSOUT T Output Mgmt U User Msg X Action Exit Y Symbol Set

       Command => ____________________________________________________________

      Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
            Help  Add   End         Save        Up    Down                    Menu

  In the example above, a notification message (`U`) is sent after job termination if

  - No error occurred during job execution (`Additional Actions for Job-ok`),

  - Condition Code 4 occurred during job execution, and

  - Any error occurred during job execution (`Any Check not ok`).

### Removing Actions

Related Topic:

- Deleting an Output Condition

To remove an action

1. On the End-of-Job Checking + Actions screen, select the event for which you want to remove the action using the line command that corresponds to this action, for example, `X` for a user exit action.

2. Press `ENTER`.

   An action-specific definition window opens (for example, Execute EOJ Action Exit).

3. In the action-specific definition window, choose PF9 (Delete).

   A confirmation window opens.

4. Enter `Y` (Yes) to confirm the deletion and press ENTER.

   (Enter `N` if you want to cancel the action.)

   The confirmation window closes, and the selected action is removed from the job.

5. Choose PF3 to close the window.

To remove an event with a single action

1. If a single action is defined for an event, you may want to remove the entire event by entering the `D` line command next to the required event on the End-of-Job Checking + Actions screen.

2. Press `ENTER`.

## End-of-Job Actions after Execution as a Temporary Dummy Job

For temporary dummy jobs, End-of-Job actions are partially carried out as if the jobs were running in normal mode.

Several End-of-Job action definitions contain a field Execute if temp. Dummy which can be used to execute the End-of-Job action according to this definition if the job was executed as a temporary dummy job.

Possible values:

`Y` | Perform the End-of-Job action if the job executed as a temporary dummy job.
`N` | Do not perform the End-of-Job action if the job executed as a temporary dummy job (default in most cases).
blank | Use the default for the specific End-of-Job action if the job executed as a temporary dummy job.

This section covers the following topics:

- Default End-of-Job Actions for Temporary Dummy Jobs

- SYSOUT Actions

### Default End-of-Job Actions for Temporary Dummy Jobs

If the Execute if temp. Dummy field is left blank in an event action definition, the following defaults apply:

Output conditions | Output conditions are always set or deleted even if the job executed as a temporary dummy job.
Network or job activation | Network or job activation is performed by default even if the job executed as a temporary dummy job.
Dummy due to schedule changes | Additional End-of-Job actions are not executed.
Dummy for other reasons | Additional End-of-Job actions are executed.
End-of-Job Action User Exit | Exit type EJA: End-of-Job action user exits are not executed

### SYSOUT Actions

Actions that refer to the SYSOUT file cannot be executed if no SYSOUT file exists. This case applies if the job is executed as a temporary dummy job.

## Defining Output Condition Actions

You can set or reset output conditions as End-of-Job actions for any job events.

You can define up to 50 output conditions for any event at the job step level or at the job level according to All checks ok and Any check not ok.

- Adding and Modifying an Output Condition

- Deleting an Output Condition

### Adding and Modifying an Output Condition

To add, view or change an output condition

1. On the End-of-Job Checking + Actions screen, type `C` in the line command input field next to the event for which you want to create an output condition or whose condition you want to view or change.

   The letter C in the Action column indicates whether an output condition already exists for the event.

2. Press ENTER.

   An Output Conditions window like the example below opens:

        18-03-06                ***** Entire Operations *****                16:01:46
        Owner SAGTEST    Network SAGNET     Version                     Job JOB-EOJ
        End-of-Job Checking + Actions  MVS/ESA               Run       Date
        ------------------------------------------------------------------------------
        C Action      +---------------------------------------------------------+ s OA
        _             !                                                         ! k
        _             !   Step ANYSTEP returns Condition Code > C0008           !
        C  C          !                   Output Conditions                     ! k
        _  C     S    !   Cmd State  Condition Name        Reference     Run    !
                      !    _  Set    OUT1-CC-JOB-EOJ       RUN                  !
                      !    _  Set    OUT2-CC-JOB-EOJ       ABS                  !
                      !                                                         !
                      !                                                         !
        ************* !                                                         ! ****
        _ AC L        !                                                         !
        _             !                                                         !
        ------------- !                                                         ! ----
        A Activat. B  !                                                         ! ther
        P Descr. R Re !                                                         !  Set
                      !    D Delete  M Modify  W Where used                     !
        Command => __ ! Enter-PF1---PF2---PF3---PF5-------PF7---PF8----PF12-    !
                      !       Help  Add   End   Save      Up    Down   Menu     !
                      +---------------------------------------------------------+

       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help  Add   End         Save        Up    Down                    Menu

   If output conditions already exist, they are listed in the table. In the example above two conditions are set for a selected Termination code event.

   The column headings are explained in Columns and Fields: Output Conditions, the line commands in Line Commands: Output Conditions.

3. Choose PF2 to add a new condition.

   Or:
   Type the line command `M` next to an existing output condition (here: `OUT1-CC-JOB-EOJ`).

   Press `ENTER`.

   An Output Condition window like the example below opens:

       +-------------------------------------------------------+
       !                                                       !
       !    Step ANYSTEP returns Condition Code > C0008        !
       !          Output Condition Modification                !
       !                                                       !
       !          Condition ==> OUT1-CC-JOB-EOJ_____           !
       !          Reference ==> RUN_____                       !
       !                Run ==> _____                          !
       !          Set/Reset ==> Set__                          !
       !                                                       !
       !   PF1 Help  PF3 End                                   !
       +-------------------------------------------------------+

4. Enter the required values.

   The fields and valid input values are explained in Columns and Fields: Output Conditions.

5. When you are finished, press ENTER and then choose PF3.

   The output condition is saved and the Output Condition Addition/Modification window closes.

6. Choose PF3 to close the Output Conditions window.

> Columns and Fields: Output Conditions

>   The columns available in the Output Conditions window and the corresponding fields in the Output Condition window are explained in the following table.

>   Column/Field | Description
>   --- | ---
>   Cmd | One-character line command input field: see Line Commands: Output Conditions.
>   State | Set/Reset |
>   Determines whether the defined output condition must be true (Set) or false (Reset) if the associated event occurs. Possible values:
>   `Set` | Condition is true (default).
>   `Reset` | Condition is false (ignored).
>   Condition Name | Condition | User-defined name for the condition. Use this name if you wish to define this output condition as an input condition for another job. Symbol replacement is possible. The submission escape character is to be used. If you want to add or modify a global condition that can be used across networks, consider the rules and restrictions for global conditions described in the section Global Conditions.
>   Reference |
>   An output condition can be set with different references (usually the current network run number). The reference is evaluated and set when the active condition is created by the Monitor according to the End-of-Job definition. Possible values:
>   `ABS` | Absolute condition. Exists only once, because it is independent of run numbers.
>   `RCM` | Sets an active condition with owner, network, run number of the calling network and appends multiple suffixes. `RCM` can be used to determine that the conditions defined for a predecessor job apply to all jobs that reference this predecessor in multiple activated subnetworks. In this case, the input condition of the corresponding successor job must be referenced with `RCA`: see `RCA` in the section Possible References for Input Conditions.
>   `RUN` or blank | Current run number of the job network is assigned (default).
>   Run | Run number of the job to which this condition applies when modifying the condition for an active job. If left blank, the current run number is assumed by default.

> Line Commands: Output Conditions

>   The line commands available in the Output Conditions window are explained in the following table.

>   Line Command | Description
>   --- | ---
>   `D` | Delete the condition as an output condition for the job. See Deleting an Output Condition.
>   `M` | Modify the output condition definition. See Adding, Displaying and Modifying Output Condition.
>   `W` | Open a Condition window with a list of jobs for which this condition is defined as an input or output condition. For more information, see the corresponding function for input conditions described in Listing Jobs Linked to an Input Condition.

### Deleting an Output Condition

To delete an output condition

1. In the Output Conditions window, type `D` in the line command field next to the output condition you want to delete.

2. Press ENTER.

   A confirmation window opens.

3. Enter `Y` (Yes) to confirm the deletion and press ENTER.

   (Enter `N` if you want to cancel the action.)

   The confirmation window closes and the selected output condition is deleted.

## Defining Actions for Symbol Value Modification

You can define a value to be assigned to a symbol or the substring of a symbol value (analogous to a BS2000 job variable) as End-of-Job action depending on the occurrence of an event. The value assignment can be performed in the master or active symbol table, or in both tables. It is possible to modify symbol tables different from the ones specified for the job or the network.

To add, view or change a symbol value setting

1. On the End-of-Job Checking + Actions screen, type `Y` in the line command input field next to the event for which you want to set a symbol value or whose current symbol value setting you want to view or change.

   The letter Y in the Action column indicates whether a symbol value has already been set for the event.

2. Press ENTER.

   A Symbol Setting window like the example below opens:

       +-------------------------------------------------------------+
       |                                                             |
       |  Job ended ok                                               |
       |                    Symbol Setting                           |
       |                                                             |
       |       Owner         EXAMPLE___                              |
       |       Network       B60-FLOW                                |
       |       Run                                                   |
       |       Symbol Table  (same)____ Version __________           |
       |       Instance      A  A Active  M Master  B Both           |
       |       Symbol        UID____________________________________ |
       |       Set Value                                             |
       |       -USER-ID________________________________              |
       |       ________________________________________              |
       |       ________________________________________              |
       |                                                             |
       |       Starting at Position  3__ in Length 8__ Format A      |
       |                                                             |
       |       Execute if temp. Dummy ===> _                         |
       |                                                             |
       |  Enter--PF1-----PF3------PF5-------------PF9-------         |
       |         Help    End      Save            Delete             |
       +-------------------------------------------------------------+

   In the example above, the string `-USER-ID` replaces or sets the value for the symbol `UID` in the `EXA-SYMBOL` master table of the owner `EXAMPLE`:

   - Assuming the old value is `NOP`, the new value in the master table will be `NOP-USER-ID`.

   - Assuming the old value is `VVVVVVVVVVVVVVVVVVVV`, the new value in the master table will be

         VVV-USER-IDVVVVVVVVV

   - Assuming an old value does not exist (`empty` value), the new value in the master table will be

             -USER-ID

     (with three leading blanks).

3. In the input fields, enter the required values. They are described in Fields: Symbol Modification

4. When you are finished, choose PF5.

   The symbol value setting is saved and the Symbol Setting window closes.

To remove a symbol value setting

- Proceed as described in Removing Actions.

This section covers the following topics:

- Fields: Symbol Modification

- Special PF Keys: Symbol Modification

### Fields: Symbol Modification

The fields available in the Symbol Setting window are explained in the following table.

Field | Description
--- | ---
Owner | Owner of the symbol table. When a symbol is set to Active or Both, the owner of the symbol table and the owner of the job must be the same. This is indicated by `(same)`, which is the default value.
Network | Read-only field. Name of the network.
Run | Applies to active job networks only. Run number to be used. If empty (zero), a symbol master is modified.
Symbol Table | Name of the symbol table that contains the symbol whose value you want to set or change. The symbol table must be defined for the network master of the job master. `(same)` indicates that the owner of the symbol table is also the owner of the job.
Version | Version of the specified symbol table. The current version (empty field) is the default.
Instance |
Instance of the symbol/symbol table where to perform the symbol value setting/modification. Valid values:
`A` | Perform modification in the active symbol table (default).
`M` | Perform modification in the symbol table master.
`B` | Perform modification in both the active symbol table and the symbol table master.
Symbol | Name of the symbol. Symbol replacement is possible. Example: `@P-JOB.-STATUS` If `@` (commercial at) is used as the submission escape character, for a job with the name `JOB-1`, a symbol with the name `JOB-1-STATUS` is set.
Value | Value to be set into the complete symbol value or a substring of the symbol value. Symbol replacement is possible. If the effective value length (after symbol replacement) is longer than the value specified in Length, the value will be shortened to the length specified there.
Position | Position at which the specified symbol value or a substring of the symbol value is set. Possible values: 1 (default) to 120 characters. See also Note for Long Symbol Values.
Length | Length of the substring of the symbol value to be set. Possible values: 1 to 120 characters. See also Note for Long Symbol Values. Note The effective value length may be shortened due to this definition. If you want to make sure that an old value is entirely replaced, enter a new value of 120 characters.
Format |
Format in which the substring of the symbol value is to be set. Possible values:
`A` | Alphanumeric.
`L` | Alphanumeric (lower case).
`U` | Alphanumeric (upper case).
`N` | Numeric.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

### Special PF Keys: Symbol Modification

You can perform the following function from the Symbol Setting window using this PF key:

PF Key | Name | Function
--- | --- | ---
PF9 | Delete | Delete the complete symbol setting definition.

## Defining Actions for Modifying Job Variable Values

(Applies to BS2000 only)

You can define a value to be assigned to a job variable (analogous to a symbol) as End-of-Job action depending on the occurrence of an event.

To add, view or change a job variable setting

1. On the End-of-Job Checking + Actions screen, type `J` in the line command input field next to the event for which you want to define a job variable setting or whose current variable setting you want to view or change.

   The letter J in the Action column indicates whether a variable setting has already been defined for the event.

2. Press ENTER.

   A Job Variable Modification window like the example below opens:

       +--------------------------------------------------------------------+
       !                                                                    !
       !  Additional Actions for Job-ok                                     !
       !                     Job Variable Modification                      !
       !                                                                    !
       !  Set Contents of Job Variable                                      !
       !  HUGO__________________________________________________            !
       !  at Position 3__ in Length 8__ with Format A                       !
       !  to                                                                !
       !  -USER-ID________________________________________________________  !
       !  ________________________________________________________________  !
       !  ________________________________________________________________  !
       !  ________________________________________________________________  !
       !                      (Optional) Write Password ==>                 !
       !                                        defined ==> no              !
       !                         Execute if temp. Dummy ==> N               !
       !                                                                    !
       !  Enter--PF1-----PF3-------PF5--------------PF9-------------------  !
       !         Help    End       Save             Delete                  !
       +--------------------------------------------------------------------+

   In the example above, the string `-USER-ID` replaces or sets the value for the job variable `HUGO`:

   - Assuming the old value is `NOP`, the new value will be `NOP-USER-ID`.

   - Assuming the old value is `VVVVVVVVVVVVVVVVVVVV`, the new value will be `VVV-USER-IDVVVVVVVVV`.

   - Assuming an old value does not exist (`empty` value), the value will be

             -USER-ID

     (with three leading blanks).

   If no job variable has been defined at the job level, the fields in this window are empty; you can set a job variable, by entering the values here.

3. In the input fields, enter the required values. They are described in Fields: Job Variable Modification.

4. When you are finished, choose PF5.

   The job variable setting is saved and the Job Variable Modification window closes.

To remove a job variable setting

- Proceed as described in Removing Actions.

### Fields: Job Variable

Field | Description
--- | ---
Set Contents of Job Variable | Name of a valid BS2000 job variable. If the job variable is specified without an explicit user ID, the job default BS2000 user ID is used as a prefix. Symbol replacement is performed in the name if the name contains the activation escape character at least once.
at Position | Position of the substring of the job variable value to be checked. Possible values: 1 to 253.
in Length | Length of the substring of the job variable value to be checked. Possible values: 1 to 253.
with Format | Format in which the substring of the job variable value is to be checked against the comparison string. Possible values:
`A` | alphanumeric
`N` | numeric
to | Enter the string or field to be set as the job variable value or as a substring of the job variable value. Symbol replacement is performed if the field contains the activation escape character at least once.
(Optional) Write Password | (Optional field) Password to be entered if the job variable is password-protected.
defined | Information field that indicates whether a Write Password is defined.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

### Special PF Keys

You can perform the following function from the Job Variable Modification window using this PF key:

PF Key | Name | Function
--- | --- | ---
PF9 | Delete | Delete the complete job variable definition.

## Defining Action User Exits

You can define user exits for End-of-Job checking and End-of-Job actions.

For information on defining user exits, see User Exits for End-of-Job Checking and Actions in the section User Exits

This section describes how to specify an action user exit for an event. Depending on your permissions, you can also add or edit an action user exit.

#### Related Topics:

- User Exits for End-of-Job Checking and Actions in the section User Exits

To add, view or change an action user exit definition

1. On the End-of-Job Checking + Actions screen, type `X` in the line command input field next to the event for which you want to define an action user exit or whose user exit definition you want to view or change.

   The letter X in the Action column indicates whether an action user exit has already been defined for the event.

2. Press ENTER.

   An Execute EOJ Action Exit window like the example below opens:

       +------------------------------------------------------+
       !                                                      !
       !  User Switch 3 of User ID BS2-UID is on              !
       !               Execute EOJ Action Exit                !
       !                                                      !
       !      Library   ===> SYSEORU_                         !
       !      Exit      ===> BS2EJA01                         !
       !      Exit Mode ===> _                                !
       !                                                      !
       !  Execute if temp. Dummy ===> _                       !
       !                                                      !
       !  Enter-PF1---PF3---PF4---PF5---------PF9-----------  !
       !        Help  End   Edit  Save        Delete          !
       +------------------------------------------------------+

3. In the input fields, enter the required values. They are described in Fields: Action User Exit.

   You can also specify the name of a user exit that does not yet exist. Entire Operations saves the definition assuming you will create the user exit later.

4. When you are finished, choose PF5 to save your entries.

   If the specified user exit does not exist, an appropriate message appears. However, you can still save the definition assuming that you will create the user exit at a later time.

5. You can choose PF4 (Edit) to view or edit the source of the specified user exit or create a new source.

   If the specified user exit does not yet exist, the edit area looks like the example below:

        EDITNAT:SYSEORU(NEW-EJA)->Subprogram-  ==> EOR1051 - Object not in the Library
        ====>                                                          Scroll===> CSR
        ***** ****************************** top of data *****************************
        00000 DEFINE DATA PARAMETER USING NOPXPL-A
        00000 END-DEFINE
        00000 * ----------------------------------------------------------------
        ***** **************************** bottom of data ****************************

       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help        End   Quit  Rfind Rchan Up    Down  Symbo Left  Right Curso

6. Enter the required text. For information on coding user exits, see User Exits for End-of-Job Checking and Actions (section User Exits) and Editing Master JCL and Natural Sources.

   When you are finished, enter the editor command `SAVE` and press ENTER.

   For a new user exit, you have to modify and save the text as a new Natural source object in the specified Natural library.

To remove an action user exit definition

- Proceed as described in Removing Actions.

This section covers the following topics:

- Fields: Action User Exit

- Special PF Keys: Execute EOJ Action Exit

### Fields: Action User Exit

The fields available in the Execute EOJ Action Exit window correspond to the fields available for a checking user exit (event type R) in the Event Definition window.

Field | Description
--- | ---
Library | Name of the Natural library that contains the user exit. See also in Natural Library/in NAT Library in Fields: Event Definition Window.
Exit | Name of the user exit. See also Exit in Fields: Event Definition Window.
Exit Mode | See Exit Mode in Fields: Event Definition Window.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

### Special PF Keys: Execute EOJ Action Exit

You can perform the following functions from the Execute EOJ Action Exit window using these PF keys:

PF Key | Name | Function
--- | --- | ---
PF4 | Edit | Edit an End-of-Job action user exit. For information on coding action user exits, see User Exits for End-of-Job Checking and Actions (section User Exits) and Editing Master JCL and Natural Sources.
PF9 | Delete | Reset execution of a user exit.

## Defining Other Actions: Deactivate Job Automatically

The Other Actions window (line command `O` on End-of-Job Checking + Actions) is used to deactivate a job automatically, even if it ended `not OK`.

Enter `Y` (Yes) in the field Accept the job if not ok if you want to deactivate the active job after termination even when it terminates with `not OK`. If you enter `N` (No), the job remains active until you have corrected or manually deactivated it.

You can choose PF9 (Delete) to reset the field to its default (blank) value and remove the defined action (the job remains active). See also Removing Actions.

## Defining Network and Job Activation Actions

#### Related Topic:

- Removing End-of-Job Actions

The occurrence of a defined event during job execution can trigger the activation of a specified single job or a whole job network. You can define activation of a job or network for specific events or at the job level for All checks ok and Any check not ok.

Activation is only possible if the network belongs to the defining user or if the defining user is authorized to activate the network of another user. The user defining the network to be activated must at least have authorization to activate this network (see Authorizing Other Users or Owners to Access a Network (Granting Access) in the section Network Maintenance).

To add, view or change an activation definition

1. On the End-of-Job Checking + Actions screen, type `A` in the line command input field next to the event for which you want to add an activation definition or whose activation definition you want to view or change.

   The letter A in the Action column indicates whether an activation action has already been defined for the event.

2. Press ENTER.

   A Network/Job Activation window like the example below opens:

       +------------------------------------------------------+
       !                                                      !
       !  Job ended ok                                        !
       !               Network / Job Activation               !
       !                                                      !
       !  Owner    ===>  EXAMPLE___                           !
       !  Network  ===>  B60-FLOW__                           !
       !  Version  ===>  __________                           !
       !  Job      ===>  JOB-01____ (empty: whole network)    !
       !                                                      !
       !  use Time Frame  ===> _                              !
       !  Schedule Usage  ===> _                              !
       !  Schedule Owner  ===> __________                     !
       !  Schedule        ===> MAY-DATES_                     !
       !                                                      !
       !  Execute if temp. Dummy ===> N                       !
       !                                                      !
       !  ---PF1---PF3---------PF5--------PF9--------PF12--   !
       !     Help  End         Save       Delete     Menu     !
       +------------------------------------------------------+

3. Enter the required values. The input fields and options are explained in Fields: Network and Job Activation.

4. When you are finished, choose PF5.

   Your action definition is saved and the window closes.

This section covers the following topics:

- Fields: Network and Job Activation

### Fields: Network and Job Activation

Field | Description
--- | ---
Owner | Name of the owner of the network to be activated. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
Network | Name of the network to be activated. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
Version | Version of the network to be activated. The current version (empty field) is the default. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
Job | Job to be activated. If the field is empty (default), the whole network is activated. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
use Time Frame | Valid values:
`T` | Activate the End-of-Job action according to the time frame/schedule defined for the called network.
empty field | Activate the job immediately (default).
Schedule Usage | Valid values:
`C` | Activate the End-of-Job action only if the current day is defined in the network's resp. explicitly defined schedule.
empty field | Always activate the End-of-Job action (default).
Schedule Owner | Name of the owner of the schedule to be used for activation. If this field is empty (default), the owner of the network to be activated is used.
Schedule | Name of the schedule to be used for activation. If this field is empty (default), the schedule of the network to be activated is used.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

## Defining Recovery Actions

You can define a recovery process to be started as the result of a defined event during job execution. You can also define recovery action at the job level according to Any check not ok.

Usually, recovery is used in case of job failure. For example, a recovery job can be a compression job started after the message `Library full` is received. The string `Library full` should be defined as a string event (event type S). Entire Operations starts the recovery job automatically when the event occurs.

The recovery process comprises the following tasks:

- Activation of a recovery network or a recovery job.

- Creation of an internal condition to provide a correct return to the calling network.

- Rescheduling of the job to be recovered.

  One recovery network can be used in multiple recovery definitions.

  It always returns to the calling network.

  It is possible to stop the calling network after the recovery.

The conventional way to trigger a recovery network would be to define an event which activates the recovery network. Recovery is then started only if the event occurs or if any check is `not OK`. The recovery network must be defined as a network master.

To add, view or change a recovery definition

1. On the End-of-Job Checking + Actions screen, type `R` in the line command input field next to the event for which you want to add a recovery definition or whose recovery definition you want to view or change.

   The letter R in the Action column indicates whether a recovery action has already been defined for the event.

2. Press ENTER.

   A Recovery Definition window like the example below opens:

       +-----------------------------------------------------+
       !                                                     !
       !  Additional Actions for Job-not-ok                  !
       !                 Recovery Definition                 !
       !  Owner      ==> (same)____                          !
       !  Network    ==> B60-FLOW__  Version ==> __________  !
       !  Job        ==> JOB-01____ (blank: whole network)   !
       !                                                     !
       !  Same Run   ==> N    (Y/N)                          !
       !  Reschedule ==> N    (Y/N/S)                        !
       !  Repeat     ==> 1_                                  !
       !  Wait Time  ==> ___  Minutes                        !
       !                                                     !
       !  ---PF1---PF3-------PF5---------PF9--------PF12---  !
       !     Help  End       Save        Delete     Menu     !
       +-----------------------------------------------------+

3. Specify the recovery network to be started. The input fields and valid values are explained in Fields: Network and Job Activation.

4. When you are finished, choose PF5.

   Your recovery definition is saved and the window closes.

To remove a recovery definition

- Proceed as described in Removing Actions.

This section covers the following topics:

- Fields: Recovery Definition

- Special PF Keys: Recovery Definition

- System Symbols for Recovery Actions

### Fields: Recovery Definition

The fields in the Recovery Definition window are described in the following table:

Field | Description
--- | ---
Owner | Owner of the network that contains the recovery job(s). Possible values
`owner-name` | Owner name other than the current owner. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
`(same)` | Owner of the current network is used (default). The default value is replaced at execution time.
Network | Network that contains the recovery job(s). The recovery network must be defined in the Network Maintenance facility. Possible values
`network-name` | Name of the network to be recovered. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
`(same)` | (Only applies to single recovery jobs.) Same name (default) as the current network that contains the job to be recovered. The default value is replaced at execution time. When you copy a recovery job to another network, the default values `(same)` for owner, network, and network version remain unchanged, so that the recovery job can be used unchanged in the network to which it was copied.
Version | Version of the network that contains the recovery job(s). Possible values
`network-version` | Version of the network that contains the job(s) to be recovered. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
`(same)` or empty field | Same version (default) as the version of the network that contains the job(s) to be recovered. The default value is replaced at execution time. When you copy a recovery job to another network, the default values `(same)` for owner, network, and network version remain unchanged, so that the recovery job can be used unchanged in the network to which it was copied.
`(current)` | Current version of the network that contains the job(s) to be recovered.
Job | Name of the last job in the recovery network to be executed upon job failure. This job must terminate successfully to start rescheduling. For possible input values to open a Selection window for a specified name range, see Specifying Filter Criteria.
Same Run | Single recovery jobs can be defined in the same network and can be executed under the same run number as the network to be recovered. All active objects of the network are then accessible for the recovery job with this run number. Possible values:
`Y` | Use same run number (default for single jobs).
`N` | Use a separate run number for the recovery (default for whole network).
Reschedule | Specifies whether the job is to be rescheduled for submission after recovery. Possible values:
`Y` | Resubmit the job.
`N` | Do not resubmit the job (default).
`S` | Stop the original network after recovery.
Repeat | Maximum number of times the original job is to be rescheduled after a recovery. Possible values: 1 (default) to 99. The Entire Operations Monitor sets the reserved condition `jobname-MAX-RETRY` if the retry limit was reached with unsuccessful rescheduling attempts. Repeat is meaningful only if Reschedule is set to `Y`.
Wait Time | Time to wait in minutes until the recovery is started, and between the recovery attempts.

### Special PF Keys: Recovery Definition

You can perform the following function from the Recovery Definition window using this PF key:

PF Key | Name | Function
--- | --- | ---
PF9 | Delete | Delete current recovery definition.

### System Symbols for Recovery Actions

When defining a recovery action, the following Entire Operations system symbols can be prefixed with the escape symbol for symbol prompting and used, for example, in a comment line in the JCL of the recovery job:

Field | Description
--- | ---
`P-C-OWNER` | Owner of the job making the call.
`P-C-NETWORK` | Network of the job making the call.
`P-C-NETWORK-VERSION` | Version of the network of the job making the call.
`P-C-JOB` | Name of job making the call.
`P-C-RUN` | Run number of the job making the call.
`P-C-SUFFIX` | Value of the suffix symbol of the job making the call.

They are substituted at JCL load with their current values. In the SYSOUT of the recovery job, you can then find the substitution of the parameters:

    *** Symbol  : P-C-OWNER
      ***   Value : GFR
      *** Symbol  : P-C-NETWORK
      ***   Value : NET-1
      *** Symbol  : P-C-JOB
      ***   Value : JOB-6
      *** Symbol  : P-C-RUN
      ***   Value : 208
      *** =====================================================
    2 //STEP1    EXEC PGM=NOPCONTI
    3 //STEPLIB  DD   DISP=SHR,DSN=NOP.DEV.LOAD
      *** CALLER OWNER   GFR
      *** CALLER NETWORK NET-1
      *** CALLER JOB     JOB-6
      *** CALLER RUN     208
      ***

In this way, you can find out the job making the call, that is, the job to be recovered by the recovery job.

## Defining SYSOUT Actions

You can define SYSOUT actions to be performed at job completion if the associated event occurs.

You can define the job SYSOUT to be cancelled or printed as the result of a defined event or the End-of-Job status (All checks ok and Any check not ok).

End-of-Job user exits are available for more complex actions, for example for obtaining selected information from the job SYSOUT. See also User Exits for End-of-Job Checking and Actions in the section User Exits.

To add, view or change a SYSOUT action

1. On the End-of-Job Checking + Actions screen, type `S` in the line command input field next to the event for which you want to add a SYSOUT action or whose SYSOUT action you want to view or change.

   The letter S in the Action column indicates whether a SYSOUT action has already been defined for the event.

2. Press ENTER.

   A SYSOUT Actions window like the following opens:

       +---------------------------------------------------------------+
       !                                                               !
       !  Job ended ok                                                 !
       !                        SYSOUT Actions                         !
       !                                                               !
       !     Delete SYSOUT after Job Completion      ===> D            !
       !     Print  SYSOUT                           ===> P            !
       !     Log SYSOUT in Entire Operations Log     ===> L            !
       !     Log SYSOUT, then Delete it              ===> N            !
       !     Log SYSOUT, then Print  it              ===> M            !
       !     Pass SYSOUT to Entire Output Mgmt       ===> O            !
       !                                                               !
       !                               Please Select ===> O            !
       !                                                               !
       !  Set Spool Class after Completion ===> ________               !
       !                                                               !
       !  PF1 Help   PF3 End               PF9 ToMF                    !
       +---------------------------------------------------------------+

   The fields and options available in the window are explained in Fields: Network and Job Activation. For the special PF key available, see Special PF Key: SYSOUT Actions.

3. Enter the code that corresponds to the function you want to perform.

4. When you are finished, choose PF5.

   The specified SYSOUT action is saved and the window closes.

To remove a SYSOUT action

- Proceed as described in Removing Actions.

This section covers the following topics:

- Fields and Options: SYSOUT Actions

- Special PF Key: SYSOUT Actions

### Fields and Options: SYSOUT Actions

Field | Description
--- | ---
Please Select | Enter one of the following codes to perform the required function:
`D` | Delete SYSOUT on job completion.
`P` | Release SYSOUT for printing.
`L` | Log SYSOUT in the Entire Operations log file.
`N` | Log SYSOUT and then delete it.
`M` | Log SYSOUT and then print it.
`O` | Pass SYSOUT to Entire Output Management (NOM).
Set Spool Class after Completion | You can specify that the spool class of a job is to be modified after completion. The definition created here overrides the default setting. Notes: This field is protected unless the executing operating system is z/OS. The class defined here has priority over other definitions. If no definition is made on the job level, the default for the node level is used: see Other Definitions for a Node (Mainframe) in the Administration documentation. If no other definition is found, the system-wide default for the operating system is used (see Defaults for z/OS in the Administration documentation). We recommend that you only define SYSOUT class changes under All checks ok or Any check not ok. The spool class change is allowed only if the job is in the OUT queue.

### Special PF Key: SYSOUT Actions

You can perform the following function from the SYSOUT Actions window using this PF key:

PF Key | Name | Function
--- | --- | ---
PF9 | ToMF | Copy the SYSOUT from UNIX or Windows to a mainframe node. A window like the one below confirms the copy operation:
    +-------------------------------------------------------+
    |                                                       |
    |  SYSOUT Copy from UNIX / Windows to Mainframe         |
    |                                                       |
    |  Owner      NOPALL        SYSOUT Node                 |
    |  Network    EA0250S1      SYSOUT Cat ID               |
    |  Run                      SYSOUT User ID              |
    |  Job        ST-TEST-OS                                |
    |  Exec.Node  N0405                                     |
    |                                                       |
    |  Note: Please use Job Definition function 'Specials'  |
    |        (PF6) to modify the values                     |
    |                                                       |
    |  ---PF1---PF3---------------------------------------  |
    |     Help  End                                         |
    |                                                       |
    +-------------------------------------------------------+
This window is for information only. The definition of a SYSOUT copy target can be made in the operating system dependent job definitions for UNIX and Windows as described in UNIX and Windows Specials.

## Defining Notification Messages

You can define a notification message to be sent as the result of a defined event, or if the job terminated `OK` or `not OK`. This is especially useful to inform appropriate user of job failures.

A user-defined message comes along with job execution information generated by Entire Operations. This information is more comprehensive if e-mails are used for sending; mailboxes have less information because they are limited to a single line. For example:

Mailbox message:

    This line is the user-defined text.
    ==> EXAMPLE / EXA-NET3 / 10 / EXA-JOB1

Corresponding e-mail message:

    Owner EXAMPLE - Network EXA-NET3 - Run 10 - Job EXA-JOB1
    ... Execution Node 123 (DAEF-123)
    Event: Additional Actions for Job-ok

    Ended ok
    This line is the user-defined text.

A message can be defined for any event or at the job level according to All checks ok and Any check not ok.

The Entire Operations Monitor continues to send a message until it has been successfully transmitted.

This section covers the following topics:

- Displaying, Modifying and Adding Notification Messages

- Deleting Notification Messages

- Fields and Columns: Message and Message Recipients

- Rules for Message Text

- Rules for E-Mail Attachments

- Special PF Keys: Message and Message Recipients

- E-Mails on z/OS

- E-Mails on BS2000

- E-Mails on UNIX and Windows

#### Related Topic:

- Global Messages for Events in the Administration documentation

### Displaying, Modifying and Adding Notification Messages

To view, change or add a notification message

1. On the End-of-Job Checking + Actions screen, type `S` in the line command input field next to the event for which you want to add a message or whose message you want to view or change.

   The letter U in the Action column indicates whether a message has already been defined for the event.

2. Press ENTER.

   A Message and Message Recipients window like the example below opens:

       +------------------------------------------------------------+
       |                                                            |
       |  Owner EXAMPLE    Network B60-FLOW   Version               |
       |    Job JOB-01                                              |
       |  Occurrence of String 'INVALID RESPONSE-CODE'              |
       |            Message and Message Recipients                  |
       |                                                            |
       |  Text ==> Job JOB-01 failed - correction required______    |
       |           more Text Y  E-Mail Attachments Y                |
       |                                                            |
       |    to ==>    Destination Type      Node                    |
       |              $MAIL-ID__  =EMAIL__  N0042                   |
       |              SAGTEST___  =MAILBOX  N0042                   |
       |              __________  ________  _____                   |
       |              __________  ________  _____                   |
       |              __________  ________  _____                   |
       |              __________  ________  _____                   |
       |              __________  ________  _____                   |
       |              __________  ________  _____                   |
       |                                                            |
       |  Execute if temp. Dummy (EOJ only) ===> _                  |
       |  Enter-PF1---PF3---PF5---PF6---PF7---------PF9---------    |
       |        Help  End   Save  Text  Attachments Delete          |
       +------------------------------------------------------------+

3. Enter the required information.

   The input fields are explained in Fields and Columns: Message and Message Recipients.

   > Recipient definitions

   >   If you want to delete all message recipient definitions in the to ==> section, choose PF9 (Delete).

   >   Caution: Use this function with care.

   > More text

   >   If you want to write text that exceeds the length of the Text field, choose PF6 (Text).

   >   A Message Text screen opens where you can enter additional text. See also Rules for Message Text.

   >   You can use PF9 (Delete) to remove all current entries. The text in the Text field is then also deleted.

   >   Choose PF5 to save the text and then PF3 to open the Message and Message Recipients window.

   >   The entry in the more Text field has changed from `N` (No) to `Y` (Yes) indicating that additional text is available.

   > E-mail attachments

   >   If you want to attach a text file to the message, choose PF7 (Attachments).

   >   An E-Mail Attachments screen opens where you can enter one or more addresses of text files to be attached to the message. See also Rules for E-Mail Attachments.

   >   You can choose PF9 (Delete) to remove all current entries.

   >   Choose PF5 to save the text and then PF3 to open the Message and Message Recipients window.

   >   The entry in the E-Mail Attachments field has changed from `N` (No) to `Y` (Yes) indicating that a file is attached to the mail.

4. When you are finished, choose PF5.

   The notification message is saved and the window closes.

### Deleting Notification Messages

To remove a notification message

- Proceed as described in Removing Actions.

### Fields and Columns: Message and Message Recipients

The fields and columns in the Message and Message Recipients window are described in the following table.

Note
The fields are mandatory unless indicated otherwise in the table. All fields are cleared if you leave a mandatory field empty and you cannot save the message definition.

Field/Column | Description
--- | ---
Text | One-line text of the message to be sent if the associated event occurs. See also Rules for Message Text.
more Text | Indicates whether additional message text is available:
`Y` | Additional text exists.
`N` | No additional text exists (default).
See also Rules for Message Text.
E-Mail Attachments | Indicates whether files are attached to an e-mail:
`Y` | Attachment exists.
`N` | No attachment exists (default).
See also Rules for E-Mail Attachments.
Destination | Message destination or recipient, respectively. In z/OS: enter the user ID of a TP system user. In BS2000: enter a terminal name and the related processor name in the Type field. In UNIX: enter a UNIX user ID valid in the UNIX environment of the addressed server. The message is sent with the UNIX mail function. Since the Destination field is usually too short for an e-mail address, it is recommended to put a symbol into this field, preceded by the submission escape character (in the previous example, `$EMAIL-ID`). The effective e-mail address must be defined as symbol value in the symbol table used by the job. If e-mail addresses are to be defined (in an EBCDIC character set) on the mainframe, the string `(a)` must be used instead of the `@` (commercial at) sign, for example: `user(a)any.host`
Type | Message recipient (destination) type. Possible input values:
`=EMAIL` | Sends the message by e-mail to any recipient in the intranet or internet. The e-mail is sent in plain text mode. As Windows does not have a built-in `sendmail` command, a command line tool must be specified in the node definition. See also E-Mails on UNIX and Windows.
`=EMH` | Sends the message by e-mail to any recipient in the intranet or internet. The e-mail is sent in HTML format. See `=EMAIL` for more information on sending e-mail.
`=EXIT` | Use the global message sending exit. See Global Message Sending Exit in section Global User Exits of the Administration documentation.
`=MAILBOX` | Sends the message to the internal Entire Operations mailbox specified in Destination.
`=COMPLET` | Sends the message explicitly to a Com-plete user (z/OS only).
`=TSO` | Sends the message explicitly to a TSO user (z/OS only).
`=CONSOLE` | Sends the message to the operator console (mainframes only). An entry in the Destination field is not required.
`processor-name` | BS2000: The processor name related to the BS2000 terminal name specified in Destination.
Node | Message sending node. Enter the Entire System Server node through which the message is routed. You can define the message sending node as a symbol . For details, see Symbols in Node Definitions in the section Symbol Table and Symbol Maintenance. Default is the execution node of the job.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

### Rules for Message Text

The following rules apply when writing message text in the Message and Message Recipients window:

> Message Text Field

>   - The Text field can contain up to 120 characters on a GUI client and 45 characters on a CUI client. Characters that exceed the CUI limit are truncated on the CUI screen.

>   - If the text contains an activation escape character, text replacement is performed from the active symbol table.

> Message Text Screen

>   - If the Text field contains text, the first input line of the Message Text screen is filled with this text by default.

>     If no text is entered in the Text field, the first input line of the Message Text screen is copied into the Text field by default. Text that exceeds the 45-character limit of the Text field is truncated.

>     Text can be entered on 10 input lines with a maximum of 120 characters per line on a GUI client and 76 characters on a CUI client. Characters that exceed the CUI limit are truncated on the CUI screen. Empty lines are removed from the text.

>   - If the text contains an activation escape character, text replacement is performed from the active symbol table.

>   - The first line of the text on the Message Text screen is moved to the Text field when the text on the Message Text screen is deleted.

Note
If the text in the Message and Message Recipients window is not modifiable, the effective message text is automatically generated for the event by Entire Operations.

### Rules for E-Mail Attachments

The following rules apply when attaching a file to an e-mail from the Message and Message Recipients window:

> Send Limits

>   You can attach up to 5 files to a message for e-mails sent through UNIX or Windows execution nodes.

>   You can attach only one file to e-mails sent through mainframe nodes.

>   There is no limitation for the size of an attachment. However, consider that large attachments, for example, consume large database space and may need more time to send the message. This can have an impact on the Entire Operations Monitor task used for message sending.

> Node Usage

>   Attachments are always taken from the execution node of the job, for which the message is sent.

>   For e-mails sent through UNIX nodes: Attachments from any execution node can be sent.

>   For e-mails sent through mainframe nodes: Attachments can be sent only if they are located on the e-mail sending node (recipient node).

>   If an attachment cannot be found, a notification is appended to the e-mail body, and a message is written to the Entire Operations log.

> File Format

>   Attachments from z/OS can be sequential text files and PDS members only. They are sent with `Content-Transfer-Encoding: 8bit`.

>   Attachments from BS2000 can be sequential text files only. They are sent with `Content-Transfer-Encoding: 8bit`.

>   Attachments from UNIX and Windows can be files of any type. They are sent with `Content-Transfer-Encoding: base64`.

> File Name

>   UNIX file names can contain '*' (asterisk). This will be treated as part of the file name and not as a wildcard character. Wildcard characters are not supported.

>   The file name can contain symbols.

>   Symbols preceded by the activation escape character are replaced at job activation time.

>   Symbols preceded by the submission escape character are replaced during message sending.

> SYSOUT

>   The SYSOUT file of a job can be attached by using the submission escape character defined for the job or containing network. Example:

>       ^P-SYSOUT

>   (assuming `^` is the submission escape character).

>   The attachment of a job's SYSOUT to an e-mail is available, if the job was executed on BS2000, UNIX, or Windows. It is not available for z/OS.

>   Note
>   You must use the submission escape character for P-SYSOUT. Depending on the repetition count of the job, different SYSOUT file names will be generated by Entire Operations, as part of the submission process.

> File Address

>   The maximum file address is 120 characters on a GUI client and 76 characters on a CUI client. Characters that exceed the CUI limit are truncated on the CUI screen.

>   Each file name must begin on a new line.

>   Files must be specified with their full path name. Example:

>       /home/sag/work/NOP 551 Adabas Files.docx

>   A Windows path name can be specified with a slash (`/`) or a back slash (`\`).

>   For mainframes, the file address can be specified using the syntax file-name(member-name), where member-name is the name of a source file. Example:

>       PDS.SOURCE1(IEFBR12)

>   A mainframe file address is converted to upper case during job activation.

### Special PF Keys: Message and Message Recipients

You can perform the following function from the Message and Message Recipients window using these PF keys:

PF Key | Name | Function
--- | --- | ---
PF6 | Text | Add additional message text. See Rules for Message Text.
PF7 | Attachments | Define and attach one or more files to an e-mail message. See Rules for E-Mail Attachments.
PF9 | Delete | Delete all message recipient definitions. Caution Use this function with care.

### E-Mails on z/OS

1. The sender name contains `Entire Operations` for all sending platforms.

2. An additional line with the Entire Operations event text is added to the mail.

> Usage Notes:

>   - Before using a z/OS Entire System Server node for sending e-mails, you must invoke the node definition in Entire Operations and enter the line command `O` (Other) for that node.

>     For further information, see Other Definitions for a Node (Mainframe) in the section Definition of Nodes in the Administration documentation.

>   - You must define at least the mail destination and the SYSOUT class for the node through which the e-mail is to be routed.

>   - The e-mail send routine for z/OS performs an Entire System Server logon, if necessary. The user ID for the logon is the submit user ID for the active job. If no submit user ID is defined for the job, the default user ID for the node is used.

>   - To use a z/OS Entire System Server for sending e-mails, make sure that all users who send e-mail are correctly defined in the security systems (if applicable). It might be necessary to define user IDs as USS users.

>     For more information, see the appropriate Entire System Server documentation for your operating and security system.

### E-Mails on BS2000

E-mails can be sent via BS2000 nodes if Entire System Server nodes are used.

- Before using a BS2000 Entire System Server node for sending e-mails, you must invoke the node definition in Entire Operations and enter the line command `O` (Other) for that node.

  For further information, see Other Definitions for a Node (Mainframe) in the section Definition of Nodes in the Administration documentation.

- The e-mail send routine for BS2000 performs an Entire System Server logon, if necessary. The user ID for the logon is the submit user ID for the active job. If no submit user ID is defined for the job, the default user ID for the node is used.

### E-Mails on UNIX and Windows

- UNIX: To be able to send e-mails on UNIX machines from Entire System Server, the following mail programs must be available there:

  AIX, HP-UX, Linux, Sun Solaris: | sendmail
  Others: | rmail

- Windows: To be able to send e-mails on Windows machines from Entire System Server, you must define a message command. This is a (third-party) command line tool to be used for sending e-mails via Entire System Server/Windows.

- Before using a UNIX or Windows node for sending e-mails, you must invoke the node definition in Entire Operations and enter the line command `O` (Other) for that node.

  The return address of the e-mail is set to the same value as E-Mail Reply-To.

  For further information, see Other Definitions for a Node (UNIX and Windows) in the section Definition of Nodes in the Administration documentation.

## Defining Release Actions for Kept Resources

You can define an End-of-job action to explicitly release the resource held by another job of this network. The quantity released for the resource is equal to the quantity defined in the prerequisite resource definition of the respective job (that is, the quantity that was allocated).

It is possible to release a resource held by any other job of this network with the Release Kept Resource option.

To add, view or change a resource release definition

1. On the End-of-Job Checking + Actions screen, type `L` in the line command input field next to the event for which you want to define a resource release action or whose release action you want to view or change.

   The letter L in the Action column indicates whether a resource has already been defined for an event.

2. Press ENTER.

   A Release Kept Resource window like the example below opens:

       +------------------------------------------------------+
       !                                                      !
       !  Job ended ok                                        !
       !                Release Kept Resource                 !
       !                                                      !
       !  Resource ==> HUGO________________                   !
       !                                                      !
       !  Execute if temp. Dummy ==> Y                        !
       !                                                      !
       !  ---PF1---PF3---------PF5--------PF9--------PF12--   !
       !     Help  End         Save       Delete     Menu     !
       +------------------------------------------------------+

   Enter the required values. The fields are explained in Fields: Release Kept Resource.

3. Choose PF5 to save your entries.

   The resource release definition is saved and the Release Kept Resource window closes.

To remove a release kept resource definition

- Proceed as described in Removing Actions.

This section covers the following topics:

- Fields: Release Kept Resource

### Fields: Release Kept Resource

The fields in the Release Kept Resource window are explained in the following table.

Field | Description
--- | ---
Resource | Name of the resource to be released. The name can be selected by using the asterisk (`*`) as a wildcard.
Execute if temp. Dummy | See End-of-Job Actions after Execution as a Temporary Dummy Job.

### On this page

- End-of-Job (EOJ) Checking and Actions - General Information
- Maintaining End-of-Job Events and Actions
- Adding and Modifying an Event Definition
- Deleting an Event Definition
- Operating System Dependent Defaults for Event Checking
- Creating and Viewing Online Documentation for Events
- Examples of Event Definitions
- Handling End-of-Job Actions
- End-of-Job Actions after Execution as a Temporary Dummy Job
- Defining Output Condition Actions
- Defining Actions for Symbol Value Modification
- Defining Actions for Modifying Job Variable Values
- Defining Action User Exits
- Defining Other Actions: Deactivate Job Automatically
- Defining Network and Job Activation Actions
- Defining Recovery Actions
- Defining SYSOUT Actions
- Defining Notification Messages
- Defining Release Actions for Kept Resources