RESOPTS
Purpose
The RESOPTS statement defines special resource options that the controller uses to process ready operations and special resource events.
RESOPTS is defined in the member of the EQQPARM library as specified by the PARM parameter in the JCL EXEC statement.
Format
>>-RESOPTS--+-----------------------------------------+---------> | .-30----------------. | '-CONTENTIONTIME(-+-number of minutes-+-)-' >--+-------------------------+----------------------------------> | .-YES---. | '-DYNAMICADD(-+-EVENT-+-)-' +-OPER--+ '-NO----' >--+-------------------------------+----------------------------> | .-NOCHANGE-. | '-DYNONCOMPLETE(-+-YES------+-)-' +-NO-------+ '-RESET----' >--+-----------------------------+------------------------------> | .-0----------. | '-LOOKAHEAD(-+-percentage-+-)-' >--+----------------------------+--+------------------------+-->< | .-NOCHANGE-. | | .-FREESR--. | '-ONCOMPLETE(-+-YES------+-)-' '-ONERROR(-+-FREESRS-+-)-' +-NO-------+ +-FREESRX-+ '-RESET----' '-KEEPSR--'
Parameters
- CONTENTIONTIME(number of minutes|30)
- CONTENTIONTIME determines how long an operation remains on the
waiting queue for a special resource before Tivoli Workload Scheduler for z/OS issues message EQQQ515W.
Specify a number of minutes (1 to 9999) that an operation must wait before Tivoli Workload Scheduler for z/OS issues message EQQQ515W. Once issued, the message is not repeated for the same special resource and operation, although Tivoli Workload Scheduler for z/OS can issue more than one message for an operation if it is on more than one waiting queue.
Note:You must also specify an alert action for resource contention on the ALERTS statement or the message will not be issued. The ALERTS statement is described in ALERTS. - DYNAMICADD(EVENT|OPER|NO|YES)
- If a special resource is not defined in the current-plan extension
file or special resource database, DYNAMICADD determines if Tivoli Workload Scheduler for z/OS creates
a special resource in response to an allocate request from a ready
operation or to a resource event created through the EQQUSIN or EQQUSINS
subroutine, SRSTAT TSO command, API CREATE request, or a RODM notification.
Specify YES, which is the default value, if Tivoli Workload Scheduler for z/OS should create a special resource in the current plan. Tivoli Workload Scheduler for z/OS uses defaults to create the resource the special resource database is not updated. When creating the resource, Tivoli Workload Scheduler for z/OS selects field values in this order:
- Values supplied by the allocating operation or event. An operation can specify a quantity, an event can specify quantity, availability, and deviation.
- Tivoli Workload Scheduler for z/OS defaults.
Specify NO if Tivoli Workload Scheduler for z/OS should not dynamically create a special resource. If an operation attempts to allocate the special resource, it receives an allocation failure, and the operation remains in status A or R with the extended status of X. If a resource event is received for the undefined resource, an error message is written to the controller message log.
Specify EVENT if Tivoli Workload Scheduler for z/OS should create a special resource in the current plan, only in response to a resource event. Resources are not created by operation allocations. But if the CREATE keyword of an SRSTAT command has the value NO, the special resource is not created.
Specify OPER if Tivoli Workload Scheduler for z/OS should create a special resource in the current plan, only in response to an allocate request from a ready operation. Resources are not created by events.
A dynamically created resource has these values if no description is found in the database:
- Special resource
- The name specified by the allocating operation or resource event.
- Text
- Blank.
- Specres group ID
- Blank.
- Hiperbatch
- No.
- Used for
- Control.
- On error
- Blank. If an error occurs, Tivoli Workload Scheduler for z/OS uses the value specified in the operation details or, if this field is also blank, the value of the ONERROR keyword of RESOPTS.
- Available
- The value specified by an event (Y or N) or blank.
- Quantity
- The value specified by an event (1 to 999999) or blank.
- Deviation
- The value specified by an event (-999999 to 999999) or blank.
- Default values
- The resource has these values that are defaults for quantity
and availability:
- Quantity
- 1. Or the quantity specified by an allocating operation. The default quantity is automatically increased if contention occurs, but only for dynamically created resources.
- Available
- Yes.
- Intervals
- No intervals are created.
- Workstations
- The resource has default value *, which means all workstations. Operations on all workstation can allocate the resource.
Also see the DYNAMICADD keyword of BATCHOPT on page ***, which controls the dynamic creation of undefined special resources during planning.
Notes:- If Tivoli Workload Scheduler for z/OS subscribes to a RODM class or object for a resource that does not exist in the current plan, the event created from the data returned by RODM causes a dynamic add of the resource, if DYNAMICADD has the value YES or EVENT.
- It is strongly recommended that, if the feature of dynamic addition of special resources is used, because almost always a special resource dynamically added does not match the previously listed criteria of being automatically deleted, DYNAMICDEL(YES) be specified in the BATCHOPT statement of the DP batch job.
- DYNONCOMPLETE(YES|NO|RESET|NOCHANGE)
- This keyword defines the value to which the global availability
of the special resource is reset when the operation that uses that
resource completes. It applies only to special resources that are
dynamically added. This value is used by Tivoli Workload Scheduler for z/OS only if the On Complete
field is blank in the operation definition and special resource definition.
You can specify these values:
- NOCHANGE
- No action is taken. This is the default.
- YES
- The global availability of the special resource is reset to YES.
- NO
- The global availability of the special resource is reset to NO.
- RESET
- The global availability of the special resource is reset to blank.
- LOOKAHEAD(percentage|0)
- Specify this keyword if you want Tivoli Workload Scheduler for z/OS to check before starting
an operation whether there is enough time before the resource becomes
unavailable. You specify the keyword as a percentage of the estimated
duration. For example, if you do not want Tivoli Workload Scheduler for z/OS to start an operation
unless the required special resource is available for the whole estimated
duration, specify 100. Specify 50 if at least half the estimated duration
must remain until the resource is due to be unavailable. If you specify
LOOKAHEAD(0), which is also the default, the operation is started
if the special resource is available, even if it will soon become
unavailable.
Tivoli Workload Scheduler for z/OS uses this keyword only if the special resource is used for control.
- ONCOMPLETE(YES|NO|RESET|NOCHANGE)
- This keyword defines the value to which the global availability
of the special resource is reset when the operation that uses that
resource completes. This value is used by Tivoli Workload Scheduler for z/OS only if the On Complete
field is blank in the operation definition and special resource definition.
You can specify these values:
- NOCHANGE
- No action is taken. This is the default.
- YES
- The global availability of the special resource is reset to YES.
- NO
- The global availability of the special resource is reset to NO.
- RESET
- The global availability of the special resource is reset to blank.
If you use a value different from the default NOCHANGE, then the global availability of all special resources is reset each time an operation using them completes.
- ONERROR(FREESRS|FREESRX|KEEPSR|FREESR)
- This keyword defines how special resources are handled when
an operation using special resources is set to ended-in-error status.
The value of the ONERROR keyword is used by Tivoli Workload Scheduler for z/OS only if the ONERROR
field of a special resource in the current plan is blank and the Keep On Error value in the operation details is
also blank.
You can specify these values:
- FREESR
- Tivoli Workload Scheduler for z/OS frees all special resources allocated by the operation.
- FREESRS
- Tivoli Workload Scheduler for z/OS frees shared special resources and retains exclusively allocated special resources.
- FREESRX
- Tivoli Workload Scheduler for z/OS frees exclusively allocated special resources and retains shared special resources.
- KEEPSR
- No special resources allocated by the operation are freed.
Tivoli Workload Scheduler for z/OS frees or retains only the quantity allocated by the failing operation. Other operations can allocate a special resource if the required quantity is available. Special resources retained when an operation ends in error are not freed until the operation gets status complete.
You can specify exceptions for individual resources in the Special Resources database and in the current plan.
Examples
RESOPTS CONTENTIONTIME(10) 1 DYNAMICADD(YES) 2 ONERROR(FREESRS) 3 LOOKAHEAD(200) 4
In this example of a RESOPTS statement:
- 1
- Tivoli Workload Scheduler for z/OS issues message EQQQ515W if an operation has waited 10 minutes to allocate a special resource.
- 2
- If a special resource is not defined in the current plan, Tivoli Workload Scheduler for z/OS creates the special resource in response to an allocate request from a ready operation or to a special resource event.
- 3
- Shared special resources are freed if the allocating operation ends in error. Exclusively allocated special resources are kept.
- 4
- If there is less than twice (200%) an operation's estimated duration left before the resource is due to become unavailable, Tivoli Workload Scheduler for z/OS will not start the operation.