AOEXEC WAIT
The WAIT function causes the EXEC to wait for a specified time interval or an optional POST event specified by the NAME() parameter, whichever occurs first.
If a POST event is specified, a local subsystem is required; otherwise the WAIT occurs in the issuing address space.
When you write an EXEC that uses AOEXEC WAIT, you must ensure that the EXEC POSTs the NAME with the IMFEXEC POST command or with a Rule that POSTs the name. If the NAME is not posted, AOEXEC processing waits until the time in the interval expires, and issues a return code of 8. The following examples describe how the POST might not occur:
- The BBI-SS PAS stops before POST is issued. A normal termination of the BBI-SS PAS will POST waiters with termination code.
- The Rule or EXEC has an incorrect NAME value specified.
- The Rule or EXEC that issues the POST does not run.
- The Rule or EXEC that issues the POST runs before AOEXEC WAIT is issued.
- The time INTERVAL expires before the Rule or EXEC that issues the POST runs.
Also, you should be aware that the Rule or EXEC might specify a POST code ID, which is passed to the WAITER. The value is then available in the IMFPOST TSO/REXX variable.
command | Parameters |
---|---|
WAIT | [TIME(999)] [NAME(token)] [SSID(subsystem identifier)] |
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
TIME | Number of seconds for AOAnywhere to wait | Valid values can range from 1 to 9999999999; the default is 30 seconds. |
NAME | Token name | Optional keyword but when specified, you must also specify the SSID keyword The value can be 1-32 alphanumeric characters long. This parameter allows you to halt execution of the EXEC until either the wait time expires or until the NAME parameter in an IMFEXEC POST command is posted. Refer to POST for additional information. The token can be issued from another PAS with the TARGET keyword. |
SS | SSID | Specifies the subsystem identifier of a local subsystem | Required keyword when the NAME keyword is specified. If the NAME parameter is not specified, SSID will be ignored. Generic wildcard characters are supported for this keyword. You can specify 1 to 4 asterisks (*) or plus signs (+).
|
Condition codes are listed in the following table:
Value | Description |
---|---|
0 | TIME interval expired and NAME was not specified or NAME was POSTED |
8 | Attempted WAIT on NAME timed out. |
16 | Invalid syntax was used; for example, the NAME() specified without SSID() |
32 | The subsystem specified by using the SS | SSID() keyword cannot be found on the local system |
Example
This example pauses the EXEC for 90 seconds or until the name MYECB is posted by the IMFEXEC POST command statement in another EXEC. The EXEC processing thread remains in use.
"AOEXEC WAIT TIME(90) NAME(MYECB) SSID(RB71)"
/* Wait for post or 90 secs */
CLIST example:
/* Wait for post or 90 secs */
Related topic