$WakeUp: Difference between revisions
mNo edit summary |
m (→Example) |
||
Line 51: | Line 51: | ||
READ SCREEN SCREEN3 | READ SCREEN SCREEN3 | ||
%TIME = $WakeUp( %TIME + 2300, 1) | %TIME = $WakeUp( %TIME + 2300, 1) | ||
</p> | |||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== |
Revision as of 00:19, 25 July 2013
Pause user until specified time
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $WakeUp function.
The $WakeUp function accepts three arguments and returns a number that is the number of milliseconds since the Online was brought up. It is a callable $function .
Syntax
[%time =] $WakeUp(wake_time, rqtm_flag, [option])
Syntax terms
%time | A positive integer. |
---|---|
wake_time | A number indicating the time to wake up, expressed as milliseconds since the Online was brought up. |
rqtm_flag | A number, which if present and non-zero, indicates that the wait time is not to be included as part of RQTM. |
option | An optional string (NOURGMSG , case unimportant) that prevents a user paused by $WakeUp from being immediately wakened if a BROADCAST URGENT message is sent. |
Usage notes
- The chief advantages of $WakeUp over the PAUSE statement are
- You can wake up at a particular time rather than after a particular number of seconds have passed.
- $WakeUp has millisecond resolution versus the second resolution of the PAUSE statement.
- $WakeUp allows the wait time to not be counted toward RQTM. This is useful in cases where the pause is simply a standard part of processing rather than a pause to allow some condition to clear.
- $WakeUp will allow a user to break in with a terminal interrupt on VTAM full screen terminals.
Example
In the following code fragment, three screens are automatically displayed for 2.3 seconds each. The sleep time is not counted toward RQTM.
%TIME = $WakeUp(0) %RC = $FakeEnt READ SCREEN SCREEN1 %TIME = $WakeUp( %TIME + 2300, 1) %RC = $FakeEnt READ SCREEN SCREEN2 %TIME = $WakeUp( %TIME + 2300, 1) %RC = $FakeEnt READ SCREEN SCREEN3 %TIME = $WakeUp( %TIME + 2300, 1)