TESTJOBS

The solutions in SolveWare subject TESTJOBS handle certain error situations arising from non-production jobs. Such a job is usually the responsibility of the job owner (that is, the user that submitted the job). The job owner is notified by Control-O of job errors as they occur.

TESTJOBS solutions must not handle production jobs, since these are already monitored by Control-M.

Solutions Provided

SolveWare subject TESTJOBS contains the following solutions:

  • Test Job Failures—Option 1

    Notifies test job owner of problems concerning the job. The user ID of the job owner is derived from part of the job name.

  • Test Job Failures—Option 2

  • Notifies test job owner of problems concerning the job. The user ID of the job owner is determined by predefined Global variables.

Test Job Failures–Option 1

When certain problems occur with a test job, this solution notifies the owner. The rules in this solution assume that the user ID of the job owner is part of the job name.

If the user ID of the job owner cannot be obtained by a %%SUBSTR operation on the job name, see Test Job Failures—Option 2.

Rules

The Test Job Failures–Option 1 solution includes the following rules:

  • Test Job Abended—Option 1

  • Test Job Not Run—JCL Error—Option 1

Rules Structure

The following tables describe the structures of the Test Job Failures–Option 1 solution rules:

Table 107 Test Job Abended—Option 1 Rule Structure

Item

Description

Title

Test Job Abended – Option 1

Name

IEF450I

Table

TESTJOB1

Message

IEF450I jjj {ppp} sss - ABEND {Scde | Ucde}
REASON=xxxxxxxx TIME=hh.mm.ss

Message Description

Job jjj terminated abnormally.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

If a test job abends, this rule notifies the job owner immediately.

The rule is triggered if the job that issued the message is named according to certain test job naming conventions. The rule assumes that the TSO user ID of job owner is the prefix of the job name. (For more details concerning rule assumptions, see Customization in this table.)

Rule Actions

  • Sets variable %%UNAME to the prefix of the job name.

  • Sends a message notifying TSO user %%UNAME of the abend.

Activating the Rule

Once scheduled, the rule remains active until deleted from Control-O.

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. Once you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule.

The SolveWare category for this rule is 3—the rule is provided as an example. Some customization is needed if the rule is to be implemented.

Customization

The rule makes several assumptions regarding test job naming conventions. These assumptions must be adapted to site conventions:

  • Test jobs are assumed to be prefixed T*. Adapt the JNAME field in the rule’s ON statement to site conventions. The rule is triggered only for jobs matching the JNAME field specification.

  • The TSO user ID of the job owner is assumed to be the first four characters of the job name. Adapt the rule actions (setting variable %%UNAME) to site conventions.

Table 108 Test Job Not Run—JCL Error—Option 1 Rule Structure

Item

Description

Title

Test Job Abended—Option 1

Name

IEF4521

Table

TESTJOB1

Message

Either of the following messages:

IEF452I jjj JOB NOT RUN - JCL ERROR

IEF453I jjj JOB NOT RUN - JCL ERROR

Message Description

Job jjj failed due to a JCL error.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

If a test job fails as a result of a JCL syntax error, this rule notifies the job owner immediately.

The rule is triggered if the job that issued the message is named according to certain test job naming conventions. The rule assumes that the TSO user ID of job owner is the prefix of the job name. (For more details concerning rule assumptions, see Customization in this table.)

Rule Actions

  • Sets variable %%UNAME to the prefix of the job name.

  • Sends a message notifying TSO user %%UNAME of the JCL error.

Activating the Rule

Once scheduled, the rule remains active until deleted from Control-O.

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. Once you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule.

The SolveWare category for this rule is 3—the rule is provided as an example. Some customization is needed if the rule is to be implemented.

Customization

The rule makes several assumptions regarding test job naming conventions. These assumptions must be adapted to site conventions:

  • Test jobs are assumed to be prefixed T*. Adapt the JNAME field in the rule’s ON statements to site conventions. The rule is triggered only for jobs matching the JNAME field specifications.

  • The TSO user ID of the job owner is assumed to be the first four characters of the job name. Adapt the rule actions (setting variable %%UNAME) to site conventions.

Test Job Failures—Option 2

When problems occur with a test job, this solution notifies the owner. The rules in this solution determine the user ID of the job owner by predefined Global variables that match the first three or four characters of the job name.

Rules

The Test Job Failures–Option 2 solution includes the following rules:

  • Test Job Abended—Option 2

  • Test Job Not Run—JCL Error—Option 2

  • Initialize Job Owner Global Variables

Rules Structure

The following tables describe the structures of the Test Job Failures–Option 2 solution rules:

Table 109 Test Job Abended—Option 2 Rule Structure

Item

Description

Title

Test Job Abended—Option 2

Name

IEF450I

Table

TESTJOB2

Message

IEF450I jjj {ppp} sss - ABEND {Scde | Ucde} REASON=xxxxxxxx TIME=hh.mm.ss

Message Description

Job jjj terminated abnormally.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

%%JOB_OWNER_pref
TSO user ID of the job owner, where pref is the 3-character to 4-character prefix derived from the job name.

Rule Logic

If a test job abends, this rule notifies the job owner immediately.

The rule checks the first four characters of the job name against a list of Global variables containing TSO user ID’s. The variable names are in the format %%JOB_OWNER_pref, where pref is the job name prefix.

If a match is found, the value obtained from the matching variable is used as the DO SHOUT destination.

If no match is found, the same check is performed for the first three characters of the job name. If a match is found, that matching variable is used as the DO SHOUT destination.

If no match is found for both 3-character and 4-character prefixes, the DO SHOUT action is skipped.

For more details concerning Global variables referenced by the rule, see Customization in this table.

Rule Actions

  • Sets variable %%PREF3 to the 3-character job name prefix.

  • Sets variable %%PREF4 to the 4-character job name prefix.

  • Sets variable %%OWNER to either
    %%JOB_OWNER_%%PREF4
    or
    %%JOB_OWNER_PREF3
    depending on which of these variables is defined. If neither is defined, %%OWNER is not set.

  • If %%OWNER is defined, sends a message notifying TSO user %%OWNER of the JCL error.

Activating the Rule

Once scheduled, the rule remains active until deleted from Control-O.

Recommended
Mode or Category

During the testing period, activate the rule in LOG mode. Once you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule.

The SolveWare category for this rule is 3—the rule is provided as an example. Some customization is needed if the rule is to be implemented.

Customization

The rule seeks the job owner user ID that matches the job prefix in the Global Variable list.

These variables must be adapted to site requirements. This can be done either manually by adding variables to the Control-O $GLOBAL member and issuing operator command F CONTROLO,LOADGLOBAL, or by implementing event rule JOBOWNER (in this solution).

The format in the Global Variable list is

%%JOB_OWNER_pref = user-ID

where pref is the job name prefix.

For example, if jobs prefixed with PRD are owned by TSO user PR01, then the Global Variable list entry must be

%%JOB_OWNER_PRD = PR01

Table 110 Test Job Not Run—JCL Error—Option 2 Rule Structure

Item

Description

Title

Test Job Abended—Option 2

Name

IEF4521

Table

TESTJOB2

Message

Either of the following messages:

IEF452I jjj JOB NOT RUN - JCL ERROR

IEF453I jjj JOB NOT RUN - JCL ERROR

Message Description

Job jjj failed due to a JCL error.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

%%JOB_OWNER_pref
TSO user ID of the job owner, where pref is the 3-character to 4-character prefix derived from the job name.

Rule Logic

If a test job fails as a result of a JCL syntax error, this rule notifies the job owner immediately.

The rule checks the first four characters of the job name against a list of Global variables containing TSO user ID’s. The variable names are in the format %%JOB_OWNER_pref, where pref is the job name prefix.

If a match is found, the value obtained from the matching variable is used as the DO SHOUT destination.

If no match is found, the same check is performed for the first three characters of the job name. If a match is found, that matching variable is used as the DO SHOUT destination.

If no match is found for both 3-character and 4-character prefixes, the DO SHOUT action is skipped.

For more details concerning Global variables referenced by the rule, see Customization in this table.

Rule Actions

  • Sets variable %%PREF3 to the 3-character job name prefix.

  • Sets variable %%PREF4 to the 4-character job name prefix.

  • Sets variable %%OWNER to either:
    %%JOB_OWNER_%%PREF4
    or
    %%JOB_OWNER_PREF3
    Depends on which of these variables is defined. If neither is defined, %%OWNER is not set.

  • If %%OWNER is defined, sends a message notifying TSO user %%OWNER of the JCL error.

Activating the Rule

Once scheduled, the rule remains active until deleted from Control-O.

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. Once you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule.

The SolveWare category for this rule is 3—the rule is provided as an example. Some customization is needed if the rule is to be implemented.

Customization

The rule seeks the job owner user ID that matches the job prefix in the Global Variable list.

These variables must be adapted to site requirements. This can be done either manually by adding variables to the Control-O $GLOBAL member and issuing operator command F CONTROLO,LOADGLOBAL, or by implementing event rule JOBOWNER (in this solution).

The format in the Global Variable list is

%%JOB_OWNER_pref=user-ID

where pref is the job name prefix.

For example, if jobs prefixed with PRD are owned by TSO user PR01, then the Global Variable list entry must be

%%JOB_OWNER_PRD=PR01

Table 111 Initialize Job Owner Global Variables Rule Structure

Item

Description

Title

Initialize Job Owner Global Variables

Name

JOBOWNER

Table

TESTJOB2

Event

JOBOWNER

Event Description

This Event rule sets the values of Global variables referenced by other rules in this solution.

Basic Scheduling Parameters

Schedule this rule if initialization or update of job-owner Global variables is desired.

Runtime Scheduling Parameters

PRIORITY 20

Global Variables

%%JOB_OWNER_pref
TSO user ID of the job owner, where pref is the 3-character to 4-character prefix derived from the job name.

Rule Logic

This rule sets the values of job-owner Global variables (%%JOB_OWNER_pref). These variables are used by the other rules in this solution to obtain the TSO user ID of a job with a certain prefix.

Rule Actions

  • Sets Global variable %%JOB_OWNER_SY01 to SY01

  • Sets Global variable %%JOB_OWNER_IOA to SY01

  • Sets Global variable %%JOB_OWNER_ADA to SY05

Activating the Rule

Once ordered, the rule is executed.

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. Once you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule.

The SolveWare category for this rule is 3—this rule is provided as an example. Implementation of the rule requires some customization.

Customization

Adapt the rule to site requirements by changing the Global Variable list to reflect actual device definitions.

A DO SET statement must be defined for every job name prefix to be identified by this solution. The format of the DO SET statement is

%%JOB_OWNER_pref=user-ID

where

  • pref is the job name prefix

  • user-ID is the TSO user ID of the job owner

For example, if jobs prefixed with PRD are owned by TSO user PR01, the DO SET statement must be defined as

DO SET=%%JOB_OWNER_PRD=PR01

Changes made in this rule take effect when the rule is scheduled again. To remove previously defined Global variables from Control-O, they must be removed both from rule definitions and from the Control-O $GLOBAL member.