$UnPost
Function
Resets a specified Event Control Block (ECB) to an unposted state, meaning that the event has not yet occurred or has not recurred. Resets the post code to zero.
Syntax
$UNPOST(ECB-number)
Where:
ECB-number is a numeric value from one to the NECBS parameter that identifies the ECB to be unposted. The ECB-number can be expressed as a numeric literal, a literal enclosed in quotation marks, a %variable, or a field name.
Usage
Use the $UNPOST function to unpost a specified, numbered ECB. An ECB must be unposted before another post or wait on this ECB takes place. The $POST and $WAIT functions do not unpost an ECB, so that a subsequent wait on the same ECB cannot take place, because the ECB is still posted from the previous posting.
Use the $POST, $UNPOST, and $WAIT functions to coordinate processing between threads for numbered ECBs. For the extended quiesce ECB, QZSIG, only the $WAIT and $POST functions are valid.
$UNPOST does not reset the contents of the post code or string data set by the $POST or $ECBDSET functions for the specified ECB.
Note: Even in a non-multiprocessing environment, the $UNPOST function should be used with extreme care. Unposting an ECB while users are waiting on it may keep users in a wait state forever or until the next $POST function is issued.
The following return codes apply to the $UNPOST function:
Return code | Meaning |
---|---|
0 | Success |
2 | Bad argument specified |
3 | NECBS parameter is not specified or is zero |
4 | The first argument is less than one or greater than the NECBS parameter |
5 | NUSERS = 1 |
8 | No argument specified |
12 | Invalid argument CPQZ or invalid argument following QZSIG |