DEVICES

The DEVICES solutions help maximize device utilization. They automate device-controlling actions that otherwise require manual response and they adjust IOA resources based on physical device monitoring.

Solutions Provided

SolveWare subject DEVICES contains the following solutions:

  • Device Status Change – Recognizes situations in which a device is varied offline by an operator command and starts the deallocation procedure or any other started task (STC) to force the device offline.

  • Device Quantitative Resource Handling – Updates the information held in the Control-M Resources file according to events impacting device availability (for example: mount or demount requests, device online or offline).

  • Device-Not-Available Handling, Option 1 – Handles device-not-available situations. A job requesting an unavailable device receives a WAIT reply followed by a NOHOLD reply.

  • Device-Not-Available Handling, Option 2 – Similar to Device-Not-Available, Option 1, except that Option 2 also distinguishes between test and production jobs.

  • Device-Not-Available Handling (in a Multisystem Environment), Option3 – Checks other systems for a free device that can be varied online to the requesting system.

Device Status Change

Under MVS, when a device is varied offline by an operator command, the device is switched to status PENDING OFF-LINE. When allocation processing allocates any device in the system (for example, at the start of any job in the system), the PENDING OFF-LINE device then goes offline. This solution recognizes the situation in which a device is pending offline and starts the IBM-supplied DEALLOC dummy procedure to force the device offline immediately.

Rules

The Device Status Change solution includes the Device Pending Offline rule.

Rules Structure

The following tables describe the structure of the Device Status Change solution rules.

Table 44 Device Pending Offline Rule Structure

Item

Description

Title

Device Pending Offline

Name

IEE794I

Table

DEVICES

Message

IEE794I ddd PENDING OFFLINE

Message Description

Device ddd is pending offline as a result of an operator command.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

When a device is pending offline, initiate the IBM supplied DEALLOC procedure, or any other dummy started task (that calls program IEFBR14), to force the device offline.

Rule Actions

Suppresses the message from the console.

Starts the DEALLOC started task (STC) to deallocate the device.

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 little or no customization.

Device Quantitative Resource Handling

Quantitative resources are commonly used to control device availability. For example, if a certain job in Control-M requires two tape drives, Control-M will not submit the job unless two drives are available.

Normally, Quantitative resources mechanism determines resource availability based only on values defined within the IOA environment. Devices manually brought online or offline or devices used by a manually submitted job (that is, a job not submitted by Control-M) are not reflected in IOA resources.

This solution’s rules monitor external changes to Quantitative resources by detecting device online or offline and device mount or demount messages and then adjust (increase or decrease) the resource quantity accordingly.

Global variables are used to define device-related information: device name, type, status, counters, name of the related Quantitative resource and (in a multi-system configuration) the CPU configuration used. These Global variables are defined during the SolveWare initialization by rule JES2GLBL in table INITSLV. For details, see the section SolveWare Initialization.

Rules

The Device Quantitative Resource Handling solution includes the following rules:

  • Initialize Device Global Variables

  • Device Brought Online

  • Device Brought Offline

  • Device Mount Request

  • Device Demount Request

  • Job Ended – Release Device Quantitative Resources

  • Device Swap in Progress

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.

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

Device-Not-Available Handling—Option 1

This solution handles situations in which an attempt to allocate a device fails. A message sent to the console asks for the operator’s instructions – whether to allocate a different device, cancel the job, or wait until the device becomes available. The WAIT option appears only if MVS determines that it is reasonable to wait for the device.

When a message’s text indicates that the WAIT option is valid, this solution instructs MVS to WAIT. When MVS issues a message asking the operator whether to hold the units already allocated to the waiting job, this solution instructs MVS not to hold the units (that is, replies NOHOLD).

Rules

The Device-Not-Available Handling—Option 1 solution includes the Device-Not-Available Handling—Option 1 rule.

Rules Structure

The following tables describe the structure of the Device-Not-Available Handling—Option 1 solution rules.

Table 52 Device-Not-Available—Option 1 Rule Structure

Item

Description

Title

Device-Not-Available—Option 1

Name

IEF238D

Table

DEVICES

Message

IEF238D jjj - REPLY {DEVICE NAME} {,}{‘WAIT’} OR ‘CANCEL’

when the message contains the string WAIT.

Message Description

Device allocation cannot be performed (completed) by MVS for specified jobname jjj.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

If a device is currently not available and the WAIT string appears in the message text, the rule replies WAIT, which instructs MVS to have the job wait for the devices to become available. The rule then expects MVS to issue message IEF433D, which asks whether to hold already allocated devices. Since holding already allocated devices can result in a deadlock, the rule replies NOHOLD.

Rule Actions

  • Sets AutoEdit reserved user-defined variable %%RESPMSG to IEF433D.

  • Replies WAIT to the message, using the message reply number.

  • If a response message (IEF433D) is intercepted, replies to that message with NOHOLD.

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.

Device-Not-Available Handling—Option 2

This solution handles situations in which an attempt to allocate a device fails. A message sent to the console asks for the operator’s instructions – whether to allocate a different device, cancel the job, or wait until the device becomes available. The WAIT option appears only if MVS determines that it is reasonable to wait for the device.

When the MVS message text indicates that the WAIT option is valid, this solution instructs MVS to WAIT. When MVS then issues a message asking the operator whether to hold, the units already allocated to the waiting job, this solution instructs MVS not to hold the units (that is, replies NOHOLD).

When the MVS message text does not contain the WAIT option, a distinction is made between test and production jobs. If the job that failed to allocate a device is a test job, the rule replies CANCEL. If the job is a production job, no reply is issued, but a message is sent to the operator explaining the situation.

Rules

The Device-Not-Available Handling—Option 2 solution includes the Device-Not-Available Handling—Option 2 rule.

Rules Structure

The following tables describe the structures of the Device-Not-Available Handling—Option 2 solution rules.

Table 53 Device-Not-Available—Option 2 Rule Structure

Item

Description

Title

Device Not-Available Handling—Option 2

Name

IEF238D

Table

DEVICES2

Message

IEF238D jjj - REPLY {DEVICE NAME} {,}{‘WAIT’} OR ‘CANCEL’

Message Description

Device allocation cannot be performed (completed) by MVS for specified jobname jjj.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

If the message appeared with the WAIT option, the reply is answered WAIT. The rule then expects MVS to issue message IEF433D, which asks whether to hold already allocated devices. Since holding already allocated devices can result in a deadlock, the rule replies NOHOLD.

If the WAIT option does not appear and the job is a test job, the rule replies CANCEL. The owner of the test job must then investigate the situation.

If the WAIT option does not appear and the job is a production job, the rule sends a highlighted message to the operator console prompting the operator to take action. The production job awaits the operator’s actions and is not automatically canceled.

Rule Actions

If the message contains the WAIT option, the rule performs the following actions:

  • sets AutoEdit reserved user-defined variable %%RESPMSG to IEF433D

  • replies WAIT to the message, using the message reply number

  • if a response message (IEF433D) is intercepted, replies to that message with NOHOLD

If the message does not contain the WAIT option, the rule performs the following actions:

  • for a test job, replies CANCEL to the message using the message reply number

  • for a production job, sends a message to the operator

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

This rule identifies test and production jobs by prefix. All test jobs are assumed to have a prefix of TEST; all jobs with a prefix other than TEST are assumed to be production jobs. Adapt these values to reflect site job prefix conventions.

Device-Not-Available Handling in a Multisystem Environment—Option 3

This solution enables tape or cartridge devices to be shared among multiple MVS systems, without requiring operator intervention, by automatically switching devices between systems when necessary. This solution is designed for JES2 sites.

When allocation of a device fails, MVS message IEF290E is issued identifying other eligible devices that are offline and can potentially be allocated for the job.

A second message, IEF238D is sent to the console requesting (from the operator) instructions on how to proceed. One of the following replies can be specified:

  • device name (address of a different device for allocation)

  • WAIT (until a device becomes available. This option appears only if MVS determines that it is reasonable to wait for a device)

  • CANCEL (the job)

Normally an operator checks whether a device of the same type is available (that is, online and not in use) on another system.

  • If it is, the operator varies the device offline from the other system and replies to message IEF238D with the device address (for allocation).

  • If it is not, the operator usually responds WAIT (if this option is available) or CANCEL (if the WAIT option is not available).

This solution performs the same actions automatically, as follows:

  • The first rule in this solution issues a request for a device to the other systems one by one, until a device is found or all systems have been queried.

  • The second rule in this solution is activated in each system that is queried. This rule determines if a device is available in the system, and if so, the rule varies the device offline and provides the device address to the first rule.

The first rule replies to the message based on the results of the query.

Rules

The Device-Not-Available Handling—Option 3 solution includes:

  • Device-Not-Available in a Multisystem Environment—Option 3

  • Check for Free Online Device

  • Suppress Control-O Internal Command

Rules Structure

The following tables describe the structures of the Device-Not-Available Handling—Option 3 solution rules.

Table 54 Device-Not-Available in a Multisystem Environment—Option 3 Rule Structure

Item

Description

Title

Device-Not-Available in a Multisystem Environment—
Option 3

Name

IEF290E

Table

DEVICES3

Message

IEF290E/IEF287E/IEF877E
jjj stepname dsname NEEDS # UNITS FOR volume ########
OFFLINE not accessible
devname1=ddd1,ddd2,...
devname2=ddd3,ddd4,..
devname3=.......

where:

jjj is the jobid
devname1, devname2,... are device names
ddd1, ddd2, ... are addresses of OFFLINE devices
dd3,dd4,... are addresses of non-accessible devices

Message Description

Device allocation cannot be performed (completed) by MVS for specified job jjj. The following (if any) devices are OFFLINE or cannot be accessed by MVS.

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_index
    Generic device name, indexed by a sequence number.
    For example:
    %%DEV_1=TAPE
    %%DEV_2=CART

  • %%DEV_INDEX_index
    Device unit address, indexed by a sequence number.
    For example:
    %%DEV_INDEX_1=460
    %%DEV_INDEX_2=461

  • %%JES2_ROUTE_smf
    Multi-access spool member, multi-access spool member node, or node member used to send a command over the network to the specified system. smf is the SMF ID of the CPU.
    For example:
    %%JES2_ROUTE_ESA1=$M2 %%JES2_ROUTE_ESA2=$N2M3

Rule Logic

If message IEF290E appears with a list of OFFLINE devices, this rule checks whether the requested device is a tape or cartridge. If the requested device is a tape or cartridge, this rule waits for the issuance of message IEF238D, which requests instructions on how to proceed.

Command rule CTOREQ (see the following section) is then activated on the other MVS system to look for an available device of the same type. (If rule CTOREQ finds an available device, it varies the device offline on the other MVS system and passes the device address to this rule.)

If this rule receives a device address from rule CTOREQ, it replies to message IEF238D with the device address and Control-O varies the device online for this system. If this rule does not receive a device address from rule CTOREQ, it issues a WAIT reply if this was one of the message options. If WAIT was not a message option, this rule replies CANCEL to message IEF238D.

Rule Actions

If message IEF290E contains a list of offline units, this rule determines if the requested device is a tape or cartridge. If the device is a tape or cartridge, the rule

  • waits for message IEF238E and stores the reply %%REPLY in AutoEdit variable %%R.

  • waits until a device address is received from Command rule CTOREQ, or until all MVS systems with a Control-O monitor have been checked for an available device

This rule issues the following command, system by system, in command-response mode. The command is passed to the appropriate system using NJE.

CTOREQ GETUNIT %%SMFID %%CONTROLO %%JOBID unittype 1

If a device address is received from rule CTOREQ using NJE message $HASP249, this rule answers to message IEF238D with the device address.

If no device address is received from CTOREQ, or if there were no tape or cartridge devices listed by message IEF290E, then if WAIT is a valid reply option to message IEF238D, this rule replies WAIT. Otherwise, this rule replies CANCEL.

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 2—some customization is required before implementation.

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 55 Check for Free Online Device Rule Structure

Item

Description

Title

Check for Free Online Device

Name

CTOREQ

Table

DEVICES3

Command

CTOREQ GETUNIT smfid monitor-name jobid unit-type 1

Command Description

This command is issued by rule IEF290E in this solution to query for an available device of the specified type.

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_index
    Generic device name, indexed by a sequence number.
    For example:
    %%DEV_1=TAPE
    %%DEV_2=CART

  • %%JES2_ROUTE_smf
    Multi-access spool member, multi-access spool member node, or node member used to send a command over the network to the specified system. smf is the SMF ID of the CPU.
    For example:
    %%JES2_ROUTE_ESA1=$M2 %%JES2_ROUTE_ESA2=$N2M3

  • %%DEV_TOTAL
    The total number of device units of all types controlled by Control-O.
    For example:
    %%DEV_TOTAL=20

Rule Logic

This rule receives a CTOREQ command using NJE from rule IEF290E. The CTOREQ command requests an available (that is, free, online) device of the specified type from the MVS system in which this rule is operating.

This rule then scans the Global variables %%DEV_TYPE_ddd looking for devices of the type requested. If such a device is found, the rule checks the corresponding Global variable %%DEV_STAT_ddd to determine if the device is online and free. If the device is online and free, the rule varies the device offline and passes the device address to rule IEF290E.

Rule Actions

Checks for an online device of the requested type.

If an online device of the correct type is found, the rule does the following:

  • issues the command V ddd,OFFLINE to vary the device offline, and waits for completion.

  • sends the device address to the requesting system by issuing the following command:
    %%JES2_ROUTE_%%SMF;%%RPLY

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 2—some customization is required before implementation.

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 56 Suppress Control-O Internal Command Rule Structure

Item

Description

Title

Suppress Control-O Internal Command

Name

CTO*

Table

DEVICES3

Command

CTO* (all commands that start with CTO)

Command
Description

Internal commands starting with CTO are used in this solution to communicate between rules on different MVS systems.

Basic Scheduling Parameters

Always schedule this rule.

Runtime Scheduling Parameters

No special considerations.

Global Variables

None.

Rule Logic

Rules CTOREQ and IEE290E in this solution communicate with each other by issuing internal commands prefixed CTO.

These commands normally cause issuance of message IEE305I, which indicates that the commands are invalid (that is, not recognized by MVS). This rule suppresses the commands so that the message IEE305I is not issued.

Rule Actions

Suppresses commands starting with CTO.

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.