gtpg2m35General Macros

LODIC-Check System Load and Mark ECB

This general macro is used to check if enough system resources are available to begin processing low-priority or batch work, and to determine if an entry control block (ECB) can be suspended (based on the level of available resources).

An ECB that calls the LODIC macro with the ECBCREATE or SUSPEND parameters is marked as a low-priority ECB. Once marked, the ECB can be suspended when system resources are below the shutdown levels defined for a specified priority class (see Table 8). Even though the ECB is marked as being able to be suspended, the ECB cannot be suspended until it gives up control. In most cases the SUSPEND parameter forces the ECB to immediately give up control. The ECBCREATE parameter does not force the ECB to immediately give up control; the ECB must wait until it gives up control by entering a post-interrupt routine. Once suspended, the ECB does not receive control again until enough system resources are available.

Format




label
A symbolic name may be assigned to the macro statement.

CHECK
Checks are performed to see if the available system resources are above the shutdown levels defined by the CLASS parameter (for example, checks to see if more work can be started). There is no immediate loss of control if you use the CHECK parameter. Control returns to the label specified by the AVAIL parameter (if coded) if more work can be started; otherwise control returns to the next sequential instruction. The CHECK parameter does not mark or unmark the ECB as capable of being suspended.

ECBCREATE
The ECB is marked as capable of being suspended and a priority class is assigned to the ECB.

There is no immediate loss of control if the ECBCREATE parameter is used.

Checks are performed to see if the available system resources are above the shutdown levels defined by the CLASS parameter (for example, checks to see if more work can be started). Control returns to the label specified by the AVAIL parameter (if coded) if more work is allowed to be started; otherwise, control returns to the next sequential instruction.

Note:
For compatibility with the TPF/MVS product, R14 will contain either 0 (no work can be started), or 1 (work can be started).

SUSPEND
The ECB is marked as capable of being suspended and a priority class is assigned to the ECB.

The SUSPEND parameter causes the ECB to immediately lose control unless the ECB is holding a resource and HOLD=NO is coded.

Checks are performed to see if the available system resources are above the shutdown levels defined by the CLASS parameter (for example, checks to see if more work can be started). If the available system resources are below the shutdown levels and the ECB is able to lose control, then the ECB is immediately suspended. If the available system resources are above the shutdown levels, then the ECB is not immediately suspended. Control returns to the label specified by the AVAIL parameter (if coded) in all cases except one. The one case in which control does not return to the label specified by the AVAIL parameter is the case where the ECB does not lose control and the available system resources are below the shutdown levels. In this case, control always returns to the next sequential instruction.

UNMARK
Removes the ability for the ECB to become suspended.
Note:
An ECB marked as capable of being suspended remains marked as such until the LODIC macro with the UNMARK parameter is entered or until the ECB exits.

AVAIL=label1
The location to which to branch if the available system resources are above the shutdown levels defined by the CLASS parameter (for example, more work can be started). This keyword is used with the CHECK, ECBCREATE, and SUSPEND parameters. Without the AVAIL parameter, control always returns to the next sequential instruction.

CLASS=BATCH|LOBATCH|IBMHI|IBMLO
Assigns a priority class to the ECB. The priority class defines a set of unique shutdown values that are used to determine when the ECB will be suspended and when the ECB will be unsuspended. The classes are BATCH, LOBATCH, IBMHI, and IBMLO. Priority classes BATCH and LOBATCH are supported for user programs. Priority classes IBMHI and IBMLO are reserved for E-type programs by the TPF system.

The CLASS parameter is used with the CHECK, ECBCREATE, and SUSPEND parameters.

Note:
See Table 8 for the shutdown levels of each priority class.

HOLD
Indicates if the ECB can be suspended while holding a resource (FIWHC, CORHC, ENQC, TASNC, EVNWC, or SYNCC LOCK).

Notes:

  1. Does not apply to resources held with the $LOCKC macro.

  2. The HOLD=YES parameter requires restricted authorization (OPTIONS=(RESTRICT)) in the IBMPAL macro.

IGNORE
Defines which block types are ignored when determining if the available system resources are above the shutdown levels defined by the CLASS parameter. The block types included will be ignored when determining if a running ECB should be suspended or if a suspended ECB should resume running. The IGNORE parameter is used with the CHECK, ECBCREATE, and SUSPEND parameters. Any subset of the following block types are supported:

CMB
Common Block

ECB
Entry Control Block

FRM
4 KB Frame

IOB
Input/Output Work Block

SWB
System Work Block.
Note:
The IGNORE keyword requires restricted authorization (CHECK=RESTRICT) in the IBMPAL macro.

CHECKONLY
Defines which block types are checked when determining if the available system resources are above the shutdown levels defined by the CLASS parameter. Only the block types included are checked when determining if a running ECB should be suspended or if a suspended ECB should resume running. The CHECKONLY parameter is used with the CHECK, ECBCREATE, and SUSPEND parameters. Any subset of the following block types is supported:

CMB
Common Block

ECB
Entry Control Block

FRM
4 KB Frame

IOB
Input/Output Work Block

SWB
System Work Block.
Note:
The CHECKONLY keyword requires restricted authorization (CHECK=RESTRICT) in the allocator.

USRPRM=Rx
Allows user data to be passed from the application program to the LODIC service routine user exit. The specified register index is passed. R0 through R7 are valid.

Entry Requirements

Return Conditions

Programming Considerations

Examples