Previous Topic: OPSWTO Command Processor—Issue WTO and WTOR MessagesNext Topic: STATESET Return Codes


STATESET Program—Set State Values

Use the STATESET program to change the current state and desired state values specified for a resource. For more information, including examples, see the chapter “Using System State Manager” in the User Guide.

You can use the following keywords and arguments to invoke STATESET:

STATESET
{tablename.resourcename|resourcename}
[ACTMODE(mode)]
[CMDRESP(TERMINAL|NOWHERE|XDQ)]
[CURRENT(currentstate)]
[DESIRED(desiredstate)]
[MODE(mode)]
[PREMODE(mode)]
[PREREQ(prereqstate)]
[REFMODE(mode)]
[SUBREQ(subreqstate)]
[SUBSYS(OPSS,ssid)]
[SYSTEM(msfids)]
[SYSWAIT(seconds)]
[TNGNOTIFY(ALWAYS|NEVER)]
[WAIT(0,seconds)]
resourcename

This is the name of the resource as entered in the NAME column of the resource information table. If the resourcename appears in multiple tables, you can specify the resource name as tablename.resourcename to improve performance; otherwise, the System State Manager scans all tables for the resourcename that you specify.

The resourcename value can contain 1 to 18 characters. The tablename, if you specify one, can contain 1 to 18 characters.

ACTMODE

(Optional) Specifies the value to be placed in the ACTMODE column of the resource. Any one- to eight-character value may be specified.

CMDRESP

(Optional) Specifies where the messages generated by the STATESET program go. When using the STATESET program in an ISPF dialog, a NOWHERE value eliminates line mode output. TERMINAL is the default.

If you specify XDQ, response lines are put on the REXX external data queue with the QUEUE command.

Note: While the code currently only validates and uses the first character of the CMDRESP value, it is strongly recommended that you always specify the complete CMDRESP value when using STATESET in your programs.

CURRENT

(Optional) Specifies the value to be placed in the CURRENT_STATE column. This value might be UP, DOWN, STARTING, STOPPING, and so on.

DESIRED

(Optional) Determines the value to be placed in the DESIRED_STATE column. This value can be UP, DOWN, or UNKNOWN.

MODE

(Optional) Specifies the type of processing that the System State Manager uses for this resource. Valid mode values are:

Note: While the code currently only validates and uses the first character of the MODE value, it is strongly recommended that you always specify the complete MODE value when using STATESET in your programs.

PREMODE

(Optional) Specifies the value to be placed in the PREMODE column of the resource. PREMODE controls whether prerequisite and subrequisite processing is performed for the resource. Valid values for the PREMODE keyword are as follows:

PREREQ

(Optional) Defines the new one- to eight-character value to be placed in the DESIRED_STATE column of all resources that are prerequisites for the resource specified by tablename.resourcename or resourcename. Usually, this value is UP or DOWN.

REFMODE

(Optional) Specifies the value to be placed in the REFMODE column of the resource. REFMODE controls whether prerequisite and subrequisite references to this resource are evaluated or ignored. Valid values for the REFMODE keyword are as follows:

SUBREQ

(Optional) Specifies the new one- to eight-character value to be placed in the DESIRED_STATE column of all resources that have the resource specified by tablename.resourcename or resourcename as a prerequisite. This value is usually UP or DOWN.

SUBSYS

(Optional) For more information on the SUBSYS keyword, see Specifying a Subsystem ID on a POI Command Processor in this chapter.

SYSTEM

(Optional) For more information on the SYSTEM keyword, see Specifying an MSF System ID on a POI Command Processor in this chapter.

Note: You may specify a single system only.

SYSWAIT

(Optional) Specifies the number of seconds (from 1 to 300) that CA OPS/MVS waits for a remote SQL response. The default is the value of MSFSYSWAIT.

TNGNOTIFY

(Optional) Allows the TNGNOTIFY column used by the CA Event Manager to be set to ALWAYS or NEVER when it exists in the resource directory table. If the column does not exist in the table, this keyword is ignored and the current value is not changed. The default is NEVER.

WAIT

(Optional) Specifies the number of seconds that the STATESET program waits for the current state to become equal to the desired state. The STATESET program compares the current-state and desired-state values every three seconds; if the wait time expires, the STATESET program returns RC=2 along with a message. The default of WAIT is 0, but you can specify a value from 1 to 300.