Understanding special resources

You can use special resources to represent any type of limited resource, such as tape drives, communication lines, or a database. You create resources using the SPECIAL RESOURCES panel, which is described in this chapter. The SPECIAL RESOURCES panel updates the resource database, which has the following details for each resource:
Name
Resource name. It can be up to 44 characters.
Availability
Available (Y) or not available (N).
Connected workstations
List of the workstations where operations can allocate the resource.
Quantity
A value from 1 to 999999.
Used for
How HCL Workload Automation for Z is to use the special resource. Allowed values are:
P
Planning
C
Control
B
Both control and planning
N
Neither control nor planning
On-error action
Action to take if the operation that allocates this resource ends in error (and does not have an overriding keep-on-error specification in the operation definition). Allowed values are:
F
Free all
FX
Free exclusively-held resources
FS
Free shared resources
K
Keep all
HCL Workload Automation for Z uses the attribute specified at operation level first. If this is blank, it uses the attribute specified in the resource database. If this is also blank, it uses the ONERROR keyword of the RESOPTS statement.
On Complete
The value to which the global availability is reset after the operation that uses the resource completes. It can be one of the following values:
Y
Sets the global availability to Yes.
N
Sets the global availability to No.
R
Sets the global availability to blank.
Blank
Uses the system default, according to the following order:
  1. The On Complete value set at operation definition level, if not blank.
  2. The On Complete value set at special resource definition level, if not blank.
  3. The ONCOMPLETE or DYNONCOMPLETE keyword value, respectively set for the not dynamically added resources or the dynamically added resources, in all the other cases.
Max Usage Limit
After how many allocations of the special resource, its availability is reset according to the value set for Max Usage Type. An internal usage counter is increased each time an operation allocates the resource. When the internal counter reaches the Max Usage Limit value, the global availability is reset to the value specified with Max Usage Type.

The default value is 0, meaning that no usage counter check is done.

Max Usage Type
Value to which the global availability is reset when the Max Usage Limit is reached. This value is valid only if the Max Usage Limit is nonzero. Possible values are:
Y
Sets the global availability to Yes.
N
Sets the global availability to No.
R
Sets the global availability to blank.

The quantity, availability, and list of workstations, can vary with time. You can create time intervals to control each special resource.

You also specify, for each operation, the special resources that it uses: how (shared or exclusive), how many (quantity), and the on-error attribute.

The long-term plan is built without taking the special resources into account, but when you extend the current plan, it schedules operations taking account of all the special resources that are used for planning (though the daily planning program does not take manually changed availability, quantity, and deviation into account. This because they are assumed to be usually temporary changes and the values will reset to the normal values when, for example, an engineer has repaired a tape unit). The special resource details of the operations in the current plan are copied from the database and held in the current plan extension data set. These details include the information from the resource database, but also have these fields:
Quantity
A value from 1 to 999999, or blank. If you specify a quantity, this overrides the scheduled quantity from the database.
Availability
It can be Y, N, or blank. If you specify an availability, this overrides the scheduled availability from the database.
Deviation
It can be from -999999 to 999999, or blank. You use the deviation to make a temporary alteration to the scheduled quantity.

To change the quantity and availability of a special resource, and the connected workstations, use the Special Resource Monitor, which is option 7 (SPECRES) in the MODIFY CURRENT PLAN panel. You might need to make a resource unavailable (to prevent the submission of all jobs needing a database, if some corruption is suspected), alter the quantity by specifying a deviation (if a tape drive is broken), or change the list of connected workstations (to include a workstation that will take over processing from the normal one). Refer to Using the special resource monitor for details.

Other ways of changing resource attributes are:
EQQUSIN subroutine
For details, see HCL Workload Automation for Z: Customization and Tuning
SRSTAT command
For details, see SRSTAT

If the availability of a resource is known to the Resource Object Data Manager (RODM), HCL Workload Automation for Z can, by subscribing to RODM for that resource, be notified automatically of any changes. This is the best alternative where RODM is installed.

Changes to special resources using any of these methods override the scheduled quantity and availability, but you can at any time reset the values to those specified for the current interval.

Thus if an operation running on a distributed agent uses a special resource, the following situation occurs:
  • When the resource is available, the controller sets the state of the operation to started and the extended status to waiting for submission.
  • The controller sends a release-dependency event to the distributed agent.
  • The distributed agent starts the operation.

If the connection between the controller and the distributed agent breaks, the operation does not start on the distributed agent even if the resource becomes available.