SRSTAT

The SRSTAT instruction invokes the TSO command SRSTAT, which you can use to change the overriding (global) availability, quantity, and deviation of a special resource. You can use it to prevent operations from allocating a particular resource, or to request the ETT function to add an occurrence to the current plan.

Keywords used in the Srstat Instruction shows the keywords that can be specified.

Table 1. Keywords used in the Srstat Instruction
Keyword Requirement Description Abbreviation
'resource name' Required The name of the resource whose availability you want to change. This parameter must be contained within single quotation marks and can be up to 44 characters in length.
AVAIL() Optional It can be one of the following:
YES
Indicates that the availability status of the resource is to be set to YES.
NO
Indicates that the availability status of the resource is to be set to NO.
RESET
Sets the overriding availability to blank, so that the interval or default value is used.
KEEP
The default, does not change the availability status.
CREATE() Optional It can be one of the following:
NO
If NO is specified, the resource is not added to the current plan of the receiving subsystem if it does not exist in the database. CREATE(NO) does not have any effect. If the resource does not exist in the database, a new resource is created.
YES
If YES is specified or defaulted, and the DYNAMICADD keyword of the RESOPTS initialization statement is set to YES or EVENT, IBM Z Workload Scheduler adds the resource to the current plan of the receiving IBM Z Workload Scheduler subsystem if the resource is not in the database. It uses these values:
Text
Blank.
Specres group ID
Blank.
Hiperbatch
No.
Used for
Control.
On error
Blank. If an error occurs,IBM Z Workload Scheduler uses the value specified in the operation details or, if that is also blank, the value of the ONERROR keyword of RESOPTS.
Overriding availability, quantity, and deviation
The value specified by SRSTAT, or blank.
Default quantity
1. The default quantity is automatically increased if contention occurs.
Default availability
Yes.
Intervals
No intervals are created.
Workstations
* (All workstations can allocate the resource).
CRE
DEVIATION() Optional It can be one of the following:
amount
If you want to change the deviation, specify a deviation, which is an amount to be added to (positive number) or subtracted from (negative number) the current quantity. A specified amount can be in the range of -999999 through +999999.
KEEP
The default, does not alter the deviation.
RESET
Sets the deviation to zero.
DEV
LIFESPAN() Optional (interval, new_availability_value)
interval
The interval of time, in minutes. It can be from 0 to 99999.
new_availability_values
The value to which the global availability is changed after interval expiration. It can be YES, NO, or RESET
QUANTITY() Optional It can be one of the following:
amount
If you want to change the overriding (global) quantity, specify the amount in the range 1–999999.
RESET
Sets the overriding quantity to blank. so that the interval or default value is used.
KEEP
The default, does not alter the quantity.
Q
SUBSYS() Optional The name of the tracker subsystem to which the SRSTAT instruction is directed. It defaults to the subsystem name specified in the OCL OPTRK initialization parameter.
TRACE() Optional Event tracing indicator. When a positive number is specified, a trace entry is created for each event generated by the SRSTAT command. The trace record is written to the message log file identified by ddname EQQMLOG. The record identifies the name of each receiving subsystem. The default value 0 will not generate trace records.
Example:
SRSTAT 'IMS.DATA.BASE' SUBSYS(OPCB) AVAIL(YES)

In this example the availability status of the resource IMS.DATA.BASE is changed to YES.

The SRSTAT instruction returns one of the following return codes:
RESULT = 0
Special resource availability modified
RESULT = 8
Invalid instruction