The WAITSTAT macro waits for a specific resource or service state change and retrieves the status.
Parameters: WAITSTAT Macro
Identifies the system image that owns the resource. If you do not specify an image, then during execution, the macro uses the following values:
If the macro is associated with a resource definition, the macro uses the image that owns the definition.
If the macro is not associated with a resource definition (for example, in an EventView rule), the macro uses the active local image.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies the class name of the resource or service for which you want to detect the state change. This field can be completed manually, by entering the appropriate valid value, or automatically by selecting from the prompted field value list. To display the list, type ? in the Resource Class field.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies the name of the resource or service for which you want to detect the state change.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies whether the specified state change applies to the actual state, desired state, or the logical state. This field can be completed manually, by entering the appropriate valid type of state, or automatically by selecting from the prompted field value list. To display the list, type ? in the State Type field.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies the required state before the change. You can specify ANY to detect state changes from any state of the specified type. This field can be completed manually by entering the appropriate valid state, or automatically by selecting from the prompted field value list. To display the list, type ? in the From State field.
If the current state does not satisfy this value, the macro cannot be processed and the return code is set to 8.
The values listed in the prompted field value list will vary depending on the value of the State Type field.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies the required state after the change. This field can be completed manually by entering the appropriate valid state, or automatically by selecting from the prompted field value list. To display the list, type ? in the To State field.
The values listed in the prompted field value list will vary depending on the value of the State Type field.
If the value of the From State field is ANY and the current state satisfies this value, the state change condition is deemed to be satisfied and the status is retrieved.
Note: You can specify a variable name in this field (for example, &VALUE) that resolves if passed as a parameter to this macro when executed.
Specifies the maximum time in seconds that can elapse while waiting for the state change. After the specified time has expired, the return code is set to the value specified in the Return Code field.
Specifies the return code to set if timeout occurs.
Limits: A number from 0 through 99. Do not specify 8 as the return code.
Specifies the prefix of the variables that contain the retrieved status information. The prefix lets you store the status information retrieved at different times in different variables.
The information is retrieved from the &ZRMST prefixed status variables when the specified state change is detected. The retrieved information is stored in a corresponding set of variables, with the ZRMST prefix replaced by the specified prefix, prefix. For example, the information retrieved from the &ZRMSTACTSTAT variable is stored in the &prefixACTSTAT variable.
The prefix must not start with one of the following characters: # or $.
Lets you store the keyword that is specified in the User Defined Keyword field on the Define Extended Display Attribute panel of a triggered message rule in a resource definition. The keyword is stored in the &prefixUSRKEYW variable.
Example: WAITSTAT Macro
In the following example, you want to detect a change in the actual state of the resource TCPA from INACTIVE to ACTIVE. If the change is not detected within 30 seconds, the process sets the return code to 16. A variable prefix of ZRMST has been specified.
PROD----- Automation Services : WAITSTAT MACRO Parameter Definition ----------- Command ===> Function=BROWSE .- State Change Event Receipt Profile ----------------------------------------. | | | System Name .............+ | | Version .................+ | | Resource Class ..........+ STC | | Resource Name ............ TCPA | | | +-----------------------------------------------------------------------------+ | | | State Type ..............+ ACTUAL | | Transition From State ...+ INACTIVE | | To State .....+ ACTIVE | | Timeout period ........... 30 (Seconds - 1-9999) | | Return code .............. 16 (0-99) | | Variable Prefix .......... ZRMST | | User Keywords ............ NO (YES/NO) | | | ’-----------------------------------------------------------------------------’ F1=Help F2=Split F3=Exit F9=Swap
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |