Previous Topic: SETTRACE CommandNext Topic: STARTREXX Command


SLEEP Command

The SLEEP command causes the issuing REXX EXEC to enter a system sleep state for the given amount of time.

This command has the following format:

ADDRESS VOX "SLEEP SECONDS(seconds) MILLISECONDS(milliseconds)"
SECONDS

Specifies the number of seconds to sleep.

MILLISECONDS

Specifies the number of milliseconds to sleep.

Return Information:

After the SLEEP command executes, it sets the special REXX return code variable RC.

Example:

The following example of the SLEEP command gets a channel, calls a number, and-when the connection is made-sleeps for two seconds:

address vox 'getchannel channelnum(1) prefix(handle)'
address vox 'call channel ('handle')tonestring('phonenumber')'
if vox.call.1 = 'PAMD' then do

/* Because some automated attendants have a long salutation */
/* wait for 2 seconds before sending any tones.             */

address vox 'sleep seconds(2)'

/* Have the automated attendant transfer */
/* your call to the desired extension.   */

address vox 'sendtones channel('handle') tonestring('extension')'

end
...

address vox 'releasechannel channel('handle')'