Previous Topic

Next Topic

Book Contents

Book Index

Rules Structure

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

Table 45 Initialize Device Global Variables Rule Structure

Item

Description

Title

Initialize Device Global Variables

Name

DEVTYPES

Table

DEVICES

Event

DEVTYPES

Event Description

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

Basic Scheduling Parameters

Schedule this rule if initialization or update of device-type Global variables is desired.

Runtime Scheduling Parameters

PRIORITY 20

Global Variables

  • %%DTYPE_TIME
    Last time the rule was executed.
  • %%DEVNAME_type
    Generic name of the device controlled by Control-O, as defined to MVS.
    For example:
    %%DEVNAME_3400=TAPE
    %%DEVNAME_348S=CART
  • %%RESNAME_name
    Name of the Quantitative resource used by Control-M for the device it controls.
    For example:
    %%RESNAME_TAPE=TAPE %%RESNAME_CART=CARTRIDGE
  • %%DEV_index
    Generic device name, indexed by a sequence number.
    For example:
    %%DEV_1=TAPE, %%DEV_2=CART
  • %%DEV_TOTAL
    Total number of all devices units types controlled by Control-O.
    For example:
    %%DEV_TOTAL=20
  • %%DEV_INDEX_index
    Device unit address, indexed by a sequence number.
    For example:
    %%DEV_INDEX_1=460
    %%DEV_INDEX_2=461

 

  • %%DEV_O_type
    Total number of devices of the specified type that are online.
    For example:
    %%DEV_O_CART=0 if there are no online cartridges %%DEV_O_TAPE=5 if there are five tapes online
  • %%DEV_T_type
    Total number of devices of the specified type.
    For example:
    %%DEV_T_CART=0 if no cartridge was defined in the installation
    %%DEV_T_TAPE=10 if 10 tape devices have been defined.
  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

This rule dynamically builds the set of Global variables that define the devices controlled by Control-O and sets the status of these devices. These variables are used by other rules in this solution to update the Quantitative resource according to the device address. This rule initializes these Quantitative resources to the number of devices that are actually online.

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

Rule Actions

  • Initializes the device names, the associated resource names and their counters.
  • Issues command D U,,,000,9999 in command-response mode, in order to get a list of all local devices and their statuses. Each line of the response (message IEE450I) contains two devices that are checked in a loop. The lines are checked for the type, status and count of all the devices whose generic names (%%DEVNAME_type variable) were defined in the rule.
  • Sets Global variable %%DEV_INDEX_index to a device address.
  • Sets Global variable %%DEV_TYPE_ddd to the generic name of the device type.
  • Sets Global variable %%DEV_STAT_ddd to ONLINE or OFFLINE.
    For example:
    %%DEV_INDEX_1=480
    %%DEV_TYPE_480=TAPE
    %%DEV_STAT_480=ONLINE
  • Sets Global variable %%DEV_TOTAL to the total number of devices of all types predefined in the rule and calculates the total number of devices of each type (%%DEV_T_type) and total number of devices of each type that are online (%%DEV_O_type).
  • Sets the Quantitative resources for the defined device types to the calculated values.
  • Issues informative messages showing the devices and values of the various counters.

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 the actual device definitions.
  • Check Global variables %%DEVNAME_type, %%RESNAME_name and %%DEV_index, which are set by the rule and adapt them to the site’s definitions.

The character used for %%ID_smfid in this rule is set in rule JES2GLBL in SolveWare Initialization table INITSLV. It may also require customization (see SolveWare Initialization).

Table 46 Device Brought Online Rule Structure

Item

Description

Title

Device Brought Online

Name

IEE302I

Table

DEVICES

Message

IEE302I {PATH(ddd,xx) | ddd} ONLINE

when the message does not contain the string PATH

Message Description

Device ddd was brought online.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the address. Valid values: ONLINE and OFFLINE.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%DEV_O_type
    Total number of devices of the specified type that are online.
    For example:
    %%DEV_O_CART=0 if there are no online cartridges %%DEV_O_TAPE=5 if there are five tapes online
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

When a device is brought online in the system, the Control-M Resources file requires adjustment to indicate the additional available resource (device). However, when the message indicates a PATH is being brought online, the message is ignored.

The rule stores the current status (ONLINE or OFFLINE) of each device in Global variable %%DEV_STAT_ddd. If message IEE320I is issued for a device that is online, the message is ignored.

Rule Actions

  • Checks the device number in the Global Variable list to determine the name of the Quantitative resource to which the device refers.
    For example:
    3490
    TAPE
  • Checks the status of the device (ONLINE or OFFLINE). If the message is issued for a device that is already online, the message is ignored.
  • If the resource name is defined in the Global Variable list and %%DEV_STAT_ddd contains value OFFLINE, the rule increases the Quantitative resource by one in the Control-M Resources file, sets Global variable %%DEV_STAT_ddd to ONLINE and increases Global variable %%DEV_O_type by one.

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 this 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 the DEVTYPES rule (see Rules), and by the JES2GLBL rule (see SolveWare Initialization). For the necessary customization, refer to those rules in this guide.

Table 47 Device Brought Offline Rule Structure

Item

Description

Title

Device Brought Offline

Name

IEF281I

Table

DEVICES

Message

IEF281I ddd NOW OFFLINE { - DEVICE IS BOXED}

Message Description

Device ddd is now offline.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address. Valid values: ONLINE and OFFLINE.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%DEV_O_type
    Total number of devices of the specified type that are online.
    For example:
    %%DEV_O_CART=0 if there are no online cartridges %%DEV_O_TAPE=5 if there are five tapes online
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

When a device is brought offline in the system, the Control-M Resources file requires adjustment to reflect that the resource (device) is no longer available. Global variable %%DEV_STAT_ddd is set to OFFLINE.

Rule Actions

  • Checks the device number in the Global Variable list to determine the name of the quantitative resource to which the device refers.
    For example:
    3490
    TAPE
  • If the resource name is defined in the Global Variable list, the rule decreases the Quantitative resource by one in the Control-M Resources file, sets Global variable %%DEV_STAT_ddd to OFFLINE and decreases %%DEV_O_type by one.

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—this rule is provided as an example. Implementation of the rule requires some customization.

Customization

The rule uses Global variables defined by the DEVTYPES rule (see Rules), and by the JES2GLBL rule (see SolveWare Initialization). For the necessary customization, refer to those rules in this guide.

Table 48 Device Mount Request Rule Structure

Item

Description

Title

Device Mount Request

Name

IEC501?

Table

DEVICES

Message

Any of the following messages:

IEC501A M ddd,ser{,labtype}{,den},jjj,sss,dsn

IEC501E M ddd,ser{,labtype}{,den},jjj,sss,dsn

IEF233A M ddd,ser{,labtype},jjj,sss,dsn

IEF233D M ddd,ser{,labtype},jjj,sss,dsn

Message Description

This message appears when a volume is to be mounted on a device.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%RESNAME_name
    Name of the Quantitative resource used by Control-M for the device it controls.
    For example:
    %%RESNAME_TAPE=TAPE %%RESNAME_CART=CARTRIDGE
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

When a mount request for a device that is handled by Control-O and is marked ONLINE, is displayed on the console, this rule decreases the device’s Quantitative resource by one to reflect the occupied device and sets %%DEV_STAT_ddd to ONLINE_jobid (where ddd is the device address and jobid identifies the job that requested mounting of the device).

If the device is marked OFFLINE, (for example, because the device was offline and was brought online implicitly by specifying the device name in the reply to message IEF238D), then a command to vary the device online is issued in order to trigger rule IEE302I.

If the mount message that triggered the rule was issued by a job submitted by Control-M, Control-O automatically checks whether Control-M has already allocated the resource to this job. If Control-M has already allocated the resource to the job, the DO RESOURCE action is ignored. This check involves no special considerations in the rule definition.

Rule Actions

Checks the device number in the Global Variable list to determine the name of the Quantitative resource to which the device refers.

For example:

  • 3490
  • TAPE
  • If the resource name is defined in the Global Variable list and %%DEV_STAT_ddd is ONLINE, the rule does the following:
  • decreases the Quantitative resource in the Control-M Resources file by one
  • decreases %%DEV_O_ddd by one
  • sets Global variable %%DEVALLOC_jobid to YES (to indicate that rule $HASP395 handles this job)
  • sets %%DEV_STAT_ddd to ONLINE_jobid (to specify that the device is used by that job)
  • If the device status is OFFLINE, command V ddd,ONLINE is issued to trigger rule IEE302I that varies online devices.

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. 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

The rule uses Global variables defined by the DEVTYPES rule (see Rules), and by the JES2GLBL rule (see SolveWare Initialization). For the necessary customization, refer to those rules in this guide.

Table 49 Device Demount Request Rule Structure

Item

Description

Title

Device Demount Request

Name

IEC234E

Table

DEVICES

Message

Either of the following messages:

IEF234E {K | D | R} ddd, ser,{PVT | PUB | STR},{jjj,sss}{,SPACE=prm}

IEC502E n ddd,ser{,labtype}{ddn-c} {SPACE=ccc,ttt,aaa/ccc,ttt}, jjj,sss{,dsn}

Message Description

This message appears when a volume is to be demounted from a device.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%RESNAME_name
    Name of the Quantitative resource used by Control-M for the device it controls.
    For example:
    %%RESNAME_TAPE=TAPE %%RESNAME_CART=CARTRIDGE
  • %%DEV_O_type
    Total number of devices of the specified type that are online.
    For example:
    %%DEV_O_CART=0 if there are no online cartridges %%DEV_O_TAPE=5 if there are five tapes online
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address. Valid values: ONLINE and OFFLINE.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

When a demount request appears on the console, this rule increases the device’s Quantitative resource by one to reflect the occupied device and sets %%DEV_STAT_ddd to OFFLINE (where ddd is the device address).

If the demount message that triggered the rule was issued by a job submitted by Control-M, Control-O automatically checks whether Control-M has already allocated the resource to this job. If Control-M has already allocated the resource to the job, the DO RESOURCE action is ignored. This check involves no special considerations in the rule definition.

Rule Actions

Checks the device number in the Global Variable list to determine the name of the Quantitative resource to which the device refers.

For example:

  • 3490
  • TAPE
  • If the resource name is defined in the Global Variable list, the rule
  • increases the Quantitative resource in the Control-M Resources file by one
  • sets %%DEV_STAT_ddd to ONLINE

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. 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

The rule uses Global variables defined by the DEVTYPES rule (see Rules), and by the JES2GLBL rule (see SolveWare Initialization). For the necessary customization, refer to those rules in this guide.

Table 50 Job Ended Release Device Quantitative Resources Rule Structure

Item

Description

Title

Job Ended Release Device Quantitative Resources

Name

$HASP395

Table

STARTSYS

Message

$HASP395 jjj ENDED

Message Description

Job jjj finished executing.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEVALLOC_jobid
    Value is YES when at least one device is held by the job identified by jobid.
  • %%DEV_index
    Generic device name, indexed by a sequence number.
    For example:
    %%DEV_1=TAPE
    %%DEV_2=CART
  • %%DEV_TOTAL
    Total number of all devices units types controlled by Control-O.
    For example:
    %%DEV_TOTAL=20
  • %%DEV_INDEX_index
    Device unit address, indexed by a sequence number.
    For example:
    %%DEV_INDEX_1=460
    %%DEV_INDEX_2=461
  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address. Valid values for this variable are ONLINE and OFFLINE.
    For example:
    %%DEV_STAT_480=ONLINE
  • %%ID_sfmid
    Character used by Control-M as a system identifier (set in AutoEdit System variable %%$SIGN) in a multi-system environment, where smfid is the SMF ID of the CPU.
    For example:
    %%ID_SYS1=A
    %%ID_ESA1=B

Rule Logic

This rule handles situations where a mount message issued for a job is not followed by an appropriate demount message (for example, when a scratch tape is mounted but not opened, no demount message is issued). In this case, the device Quantitative resource is not released, since the demount message did not appear.

For each job running in the system, the MOUNT rule sets the corresponding Global variable %%DEVALLOC_jobid to YES if at least one device was mounted by the job. In this case, the status of the allocated devices (%%DEVSTAT_ddd) becomes ONLINE_jobid.

The rule checks the %%DEVALLOC_jobid variable to determine whether the rule processes the job (identified by jobid). If its value is YES, all the devices with status ONLINE_jobid is counted by device name and their statuses are reset to ONLINE. The Quantitative resource device counters are increased according to their respective device names.

The Global %%DEVALLOC_jobid is set to %%UNDEF, which removes it from the Global Variable list.

When all devices have been released from the job by the DEMOUNT rule, no devices are found.

Rule Actions

If there are devices allocated by the job, the rule performs the following:

  • counts the allocated devices that were not handled by the DEMOUNT rule
  • resets Global variable %%DEVSTAT_ddd to ONLINE
  • deletes Global variable DEVALLOC_jobid
  • increases the device’s Quantitative resource in accordance with the value of the counters

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. 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. Implementation of this rule requires some customization.

Customization

The rule is defined to handle Quantitative resources TAPE and CASSET. Update these values. You can add additional Quantitative resources to conform to site requirements.

Table 51 Device Swap in Progress Rule Structure

Item

Description

Title

Device Swap in Progress

Name

IGF502E

Table

DEVICES

Message

IGF502E PROCEED WITH SWAP OF ddd1 TO ddd2

Message Description

A device swap is in progress. The tape or cartridge volume is moved from device ddd1 to device ddd2.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

  • %%DEV_TYPE_ddd
    Generic name of a device type, where ddd is
    the device address.
    For example:
    %%DEV_TYPE_480=TAPE
    %%DEV_TYPE_490=CART
  • %%DEV_STAT_ddd
    Status of a device, where ddd is the device address.
    For example:
    %%DEV_STAT_480=ONLINE

Rule Logic

If the device types of devices ddd1 and ddd2 are defined to the SolveWare, target device ddd2 is assigned the current status of source device ddd1 and the status of source device ddd1 is reset to ONLINE.

Rule Actions

The value of Global variable %%DEV_STAT_ddd2 is set to the value of %%DEV_STAT_ddd1.

The value of Global variable %%DEV_STAT_ddd is set to ONLINE.

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. 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 1—little or no customization is required before implementation.

Parent Topic

Device Quantitative Resource Handling