Previous Topic

Next Topic

Book Contents

Book Index

Rules Structure

The following tables describe the structures of the Quantitative Resource Handling solution rules.

Table 155 Initialize Environment, Start Monitoring Initiators Rule Structure

Item

Description

Title

Initialize Environment, Start Monitoring Initiators

Name

INITFRST

Table

INITJES2

Event

INITFRST

Event Description

This Event rule initializes SolveWare solution INITIATORS. Global variables defined by this rule are necessary for the implementation of other rules in this solution.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%CTM_CLASS_index
    Class to be monitored by Control-M, indexed by a sequence number. For more information on this variable, see Customization in this table.
  • %%CTM
    Character used by Control-M as a system identifier in a multisystem environment (AutoEdit variable %%$SIGN). %%ID_smfid Global variables are set by rule JES2GLBL in SolveWare subject STARTSYS. This rule determines the value for the %%ID_smfid variable for the current system and stores it in Global variable %%CTM.

    For example:
    If the SMFID of the current system is SYS1 and %%$SIGN=A was specified in the Control-M installation on this machine, the following values are specified:
    %%ID_SYS1=A in rule JES2GLBL
    %%CTM=A in rule INITFRST
  • %%INIT_NUMBER
    Total number of initiators in the system.
    For example:
    %%INIT_NUMBER=15.
  • %%PROC_index
    Internal indicator of the status of Quantitative resources for classes served by a specific initiator. Valid values are
    – NO Quantitative resources relevant to the initiator are under construction. This value is specified at the beginning of the rule before variables relevant to the initiator have been reset.
    For example:
    %%PROC_1=NO
    – YES Quantitative resources relevant to the initiator reflect real initiator state. This value is specified when the variables relevant to this initiator have been reset .
    For example:
    %%PROC_1=YES

Rule Logic

This rule issues command $DI in command-response mode to generate a list of all initiators in the system. Each line of the response (message $HASP605) describes one initiator. AutoEdit variable %%INIT_NUMBER is set according to the number of lines in the command-response.

This rule also sets Global variables that are used by other rules in this solution.

Rule Actions

  • Clears the environment from the previous run of this SolveWare solution.
  • Defines classes monitored by Control-M.
  • Counts initiators in the system.
  • Initiates the environment for the solution.

Activating the Rule

The rule is triggered immediately once it has been ordered.

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. When you are satisfied with the results of the rule and the log messages are no longer necessary, change the mode of this rule to PROD.

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

Customization

Adapt the rule by changing the Global Variable list to reflect the real environment.

Ensure that the appropriate number of %%CTM_CLASS_index variables are specified to define the classes to be monitored at your site.

To avoid conflict with variables set by previous usage of this SolveWare, a variable with an index of one more than the number of classes must be specified with the value %%$UNDEF.

For example:

If classes A and B are monitored by Control-M, the following must be specified:

%%CTM_CLASS_1=A,

%%CTM_CLASS_2=B,

%%CTM_CLASS_3=%%$UNDEF

In multisystem configurations, this rule uses Global variables defined by rule JES2GLBL. For customization information about these variables, see SolveWare Initialization.

Table 156 Set Up Initiator Global Variables Rule Structure

Item

Description

Title

Set Up Initiator Global Variables

Name

INITCRT

Table

INITJES2

DO RULE

INITCRT

DO RULE Description

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

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%CLASS_class_T
    Total number of initiators in the system serving a specific class.
    For example:
    %%CLASS_A_T=25.
  • %%CLASS_class_O
    Total number of available initiators in the system (that is, in INACTIVE status) serving a specific class.
    For example:
    %%CLASS_A_O=15
  • %%PROC_index
    Internal indicator of the status of Quantitative resources for classes served by a specific initiator. Valid values are
    – NO Quantitative resources relevant to the initiator are under construction. This value is specified at the beginning of the rule before variables relevant to the initiator have been reset.
    For example:
    %%PROC_1=NO
    – YES Quantitative resources relevant to the initiator reflect real initiator state. This value is specified when the variables relevant to this initiator have been reset.
    For example:
    %%PROC_1=YES
  • %%IN_PROCESS
    Internal indicator of the status of all Quantitative resources describing initiators. Valid values are
    – YES Quantitative resources relevant to all initiators are under construction.
    – NO Quantitative resources relevant to all initiators reflect actual initiator status.

 

  • %%INIT_index
    Initiator name, indexed by sequence number.
    For example:
    %%INIT_1=1, %%INIT_10=A
  • %%JOB_index
    JOB ID of the job being processed by each initiator, indexed by sequence number. If an initiator is inactive, the %%JOB_index variable for that initiator has a value of NONE.
    For example:
    %%JOB_1=NONE
    %%JOB_10=JOB01384
  • %%CLS_index
    List of classes served by a specific initiator, indexed by sequence number.

    For example:
    If the first initiator serves classes A, B and I and the second initiator serves only class A, the following is specified:
    – %%CLS_1=ABI
    – %%CLS_2=A
  • %%CLS_#_index
    Number of classes served by a specific initiator, indexed by sequence number.

    For example:
    If the first initiator serves classes A, B and I and the second initiator serves only class A, the following is specified:
    – %%CLS_#_1=3
    – %%CLS_#_2=1
  • %%STC_index
    STC number of a specific initiator, indexed by sequence number. The value of this variable for initiators that are unavailable (for example, initiators in HALTED or DRAINED status) is (NONE).

    For example:
    – %%STC_1=(NONE)
    – %%STC_10=STC32261).

Rule Logic

This rule is triggered by other rules in this solution:

  • At the start of processing.
  • Whenever certain JES2 commands are detected.

This rule defines a Quantitative resource for each class monitored by Control-M.

This rule dynamically defines Global variables that describe Control-M classes and initiator status. These variables are used by other rules in this solution to update Quantitative resources according to the number of available initiators serving each class.

Rule Actions

Initializes Global AutoEdit variables that describe initiators serving monitored classes.

Sets all %%PROC_index Global variables to NO to prevent other rules in the solution from interrupting processing of this rule.

Sets Global variable %%IN_PROCESS to YES to prevent other rules in this solution from interrupting processing of this rule.

Issues command $DI in command-response mode to generate a list of all initiators in the system. Each initiator is described by three lines of the response message ($HASP605). AutoEdit variables %%INIT_index, %%JOB_index, %%CLS_#_index, %%CLS_index, %%STC_index, %%CLASS_class_T and %%CLASS_class_O are set according to information extracted from this message.

When all response message lines for an initiator have been analyzed, the corresponding %%PROC_index Global variable is set to YES to re-enable update of relevant Quantitative resources.

Sets Global variable %%IN_PROCESS to NO to again allow other rules in this solution to update Quantitative resources and Global variables relevant to JES2 initiator status.

Calls rule STRS to update Quantitative resources.

Activating the Rule

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

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. When 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

The rule uses Global variables defined by rule INITFRST in this solution. For customization information, see Table 155.

Table 157 Perform DO RESOURCE Request Rule Structure

Item

Description

Title

Perform DO RESOURCE Request

Name

STRS

Table

INITJES2

DO RULE

STRS resource-name resource-quantity

Rule Description

This rule updates Quantitative resources to inform Control-M of changes in initiator availability.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

%%CTM
Character used by Control-M as a system identifier in a multisystem environment. This variable is defined by the INITFRST rule in this solution (see Table 155.)
For example:
%%CTM=B.

Rule Logic

The quantity specified for an Quantitative resource must be four digits in length. This rule determines the number of digits in the quantity to be specified and adds the appropriate number of leading zeroes to the quantity in the DO RESOURCE statement before updating the Quantitative resource.

Rule Actions

  • Builds the name of the Quantitative resource to be updated. The value stored in Global variable %%CTM is added as a suffix to this resource name to ensure that the resource name is unique.
  • Builds a 4-digit quantity for the Quantitative resource name from a received parameter.
  • Performs a DO RESOURCE action.

Activating the Rule

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

Recommended
Mode or Category

During the testing period, activate the rule in LOG mode. When 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

The rule uses Global variables defined by rule INITFRST in this solution. For customization information, see Table 155.

Table 158 Reset Variables at $TI, $SI, and $ZI Commands Rule Structure

Item

Description

Title

Reset Variables at $TI, $SI, and $ZI Commands

Name

$TI*

Table

INITJES2

Command

$TI, $SI, or $ZI

These commands affect initiator status.

Command
Description

  • $TI Reassigns one or more initiators to specified classes.
  • $SI Starts one or more initiators.
  • $ZI Halts one or more initiators.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

%%IN_PROCESS
Internal indicator of the status of all Quantitative resources describing initiators. Valid values are

  • YES Quantitative resources relevant to all initiators are under construction.
  • NO Quantitative resources relevant to all initiators reflect actual initiator status.

Rule Logic

Each time command $TI, $SI or $ZI is issued, the rule triggers rule INITCRT of this solution to check initiator status and update relevant Global variables and Quantitative resources.

Rule Actions

  • Checks Global variable %%IN_PROCESS. If the value of this variable is YES, Quantitative resources relevant to all initiators are under construction and the rule waits until this construction is completed.
  • Triggers rule INITCRT to update all initiator related Quantitative resources.

Activating the Rule

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

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. When 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 1—little or no customization is required before implementation.

Table 159 Job Started Rule Structure

Item

Description

Title

Job Started

Name

$HASP373

Table

INITJES2

Message

$HASP373 jobname STARTED

Message Description

This information message is issued when a job begins execution.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling
Parameters

No special considerations.

Global Variables

  • %%IN_PROCESS
    Internal indicator of the status of all Quantitative resources describing initiators. Valid values are
    – YES Quantitative resources relevant to all initiators are under construction.
    – NO Quantitative resources relevant to all initiators reflect actual initiator status.
  • %%PROC_index
    Internal indicator of the status of Quantitative resources for classes served by a specific initiator. Valid values are
    – NO Quantitative resources relevant to the initiator are under construction. This value is specified at the beginning of the rule before variables relevant to the initiator have been reset.
    For example:
    %%PROC_1=NO
    – YES Quantitative resources relevant to the initiator reflect real initiator state. This value is specified when the variables relevant to this initiator have been reset.
    For example:
    %%PROC_1=YES
  • %%JOB_index
    JOB ID of the job being processed by each initiator, indexed by sequence number. If an initiator is inactive, the %%JOB_index variable for that initiator has a value of NONE.
    For example:
    %%JOB_1=NONE
    %%JOB_10=JOB01384
  • %%CLASS_class_O
    Total number of available initiators in the system (that is, in INACTIVE status) serving a specific class.
    For example:
    %%CLASS_A_O=15

Rule Logic

Each time a job is started, initiator related information is changed. This rule updates all relevant Global variables and Quantitative resources.

Rule Actions

  • Determines the sequence number of the initiator serving started job.
  • Checks if Global variables and Quantitative resources relevant to the initiator serving the started job are under construction.
  • If Global variables and/or Quantitative resources relevant to this initiator are under construction, the rule does not update these variables.
  • Specifies the JOB ID of the started job in the %%JOB_index Global variable of the initiator processing the job.
  • Updates (decreases by one) the total number of available initiators (Global variables %%CLASS_class_O) for classes served by the initiator processing the started job.
  • Calls rule STRS to update relevant Quantitative resources.

Activating the Rule

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

Recommended Mode or Category

LOG mode. When 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.

Table 160 Job Ended Rule Structure

Item

Description

Title

Job Ended

Name

$HASP395

Table

INITJES2

Message

$HASP395 jobname ENDED

Message Description

This message is issued by JES2 when a job finishes executing.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%IN_PROCESS
    Internal indicator of the status of all Quantitative resources describing initiators. Valid values are
    – YES Quantitative resources relevant to all initiators are under construction.
    – NO Quantitative resources relevant to all initiators reflect actual initiator status.
  • %%PROC_index
    Internal indicator of the status of Quantitative resources for classes served by a specific initiator. Valid values are
    – NO Quantitative resources relevant to the initiator are under construction. This value is specified at the beginning of the rule before variables relevant to the initiator have been reset.
    For example:
    %%PROC_1=NO
    – YES Quantitative resources relevant to the initiator reflect real initiator state. This value is specified when the variables relevant to this initiator have been reset.
    For example:
    %%PROC_1=YES
  • %%JOB_index
    JOB ID of the job being processed by each initiator, indexed by sequence number. If an initiator is inactive, the %%JOB_index variable for that initiator has a value of NONE.
    For example:
    %%JOB_1=NONE
    %%JOB_10=JOB01384
  • %%CLASS_class_O
    Total number of available initiators in the system (that is, in INACTIVE status) serving a specific class.
    For example:
    %%CLASS_A_O=15

Rule Logic

Each time a job is ended, initiator related information is changed. This rule updates all relevant Global variables and Quantitative resources.

Rule Actions

  • Determines the sequence number of the initiator serving the job that ended.
  • Checks if Global variables and Quantitative resources relevant to the initiator serving the ended job are under construction.
  • If Global variables and/or Quantitative resources relevant to this specific initiator are under construction, the rule does not update these variables.
  • Specifies NONE in the %%JOB_index Global variable of the initiator that processed the ended job.
  • Updates (increases by one) the total number of available initiators (Global variables %%CLASS_class_O) for classes served by the initiator that processed the ended job.
  • Calls rule STRS to update relevant Quantitative resources.

Activating the Rule

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

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. When 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.

Table 161 Initiator Ended Rule Structure

Item

Description

Title

Initiator Ended

Name

$HASP395

Table

INITJES2

Message

$HASP395 INIT ENDED

Message Description

This message is issued by JES2 when an initiator finishes executing.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%JOB_index
    JOB ID of the job being processed by the initiator, indexed by sequence number. If an initiator is inactive, the %%JOB_index variable for that initiator has a value of NONE.
    For example:
    %%JOB_1=NONE
    %%JOB_10=JOB01384
  • %%STC_index
    STC number of the initiator, indexed by sequence number. The value of this variable for initiators that are unavailable (for example, initiators in HALTED or DRAINED status) is (NONE).
    Examples
    %%STC_1=(NONE)
    – %%STC_10=STC32261
  • %%CLASS_class_T
    Total number of initiators in the system serving a specific class (for example, %%CLASS_A_T=25).
  • %%CLASS_class_O
    Total number of available initiators in the system (that is, in INACTIVE status) serving a specific class (for example, %%CLASS_A_O=15).

Rule Logic

When an initiator is ended, the rule updates all Global variables related to that initiator.

Rule Actions

Determines the sequence number of the stopped initiator.

Specifies NONE in the %%JOB_index Global variable of the stopped initiator.

Specifies (NONE) in the %%STC_index Global variable of the stopped initiator.

Updates (decreases by one) the total number of initiators and number of available initiators (Global variables %%CLASS_class_T and %%CLASS_class_O) for all classes served by the stopped initiator.

Calls rule STRS to update relevant Quantitative resources.

Activating the Rule

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

Recommended Mode or Category

During the testing period, activate the rule in LOG mode. When 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.

Parent Topic

Quantitative Resource Handling