Resource definition
Resources represent physical or logical scheduling resources that can be used as dependencies for jobs and job streams. Resources can be used as dependencies only by jobs and job streams that run on the workstation where the resource is defined.
Due to the resources dependencies resolution mechanism, a resource dependency at job stream level can be considered 'local' (and then its use supported) rather than 'global', when both the job stream and all its jobs are defined on the same workstation as the resource. However, a standard agent and its host can reference the same resources. For more information, refer to the needs keyword.
Syntax
$resource
workstation#resourcename units [“description” ]
[workstation#resourcename ...]
Arguments
- workstation
- Specifies the name of the workstation or workstation class on which the resource is used.
- resourcename
- Specifies the name of the resource. The name can contain up to eight alphanumeric characters, including dashes (-) and underscores (_), and must start with a letter.
- units
- Specifies the number of available resource units. Values can be 0 through 1024.
- “description”
-
Provides a description of the resource. The description can contain up to 120 alphanumeric characters. It must be enclosed in double quotation marks.
The resource units involved in needs dependencies for a job or for a job stream remain busy until the job or job stream is completed (successfully or not). The resource units are released as soon as the job or job stream is completed.
When multiple jobs and job streams depend on the same resource, if not enough resource units are currently available for all of them it is assigned according to the job or job stream priority. The status of a job or job stream becomes READY as soon as all its dependencies are resolved. If the limit CPU set on the workstation does not allow it to run at the moment, it waits in READY state. The only exception to this behavior is when the job or job stream is GO or HI, in which case it starts regardless of the value set for limit CPU.
Examples
$resource
ux1#tapes 3 "tape units"
ux1#jobslots 24 "job slots"
ux2#tapes 2 "tape units"
ux2#jobslots 16 "job slots"
See also
For more information about how to perform the same task from the Dynamic Workload Console, see: