Was this helpful?
sleep Statement--Suspend Application Execution
This statement suspends execution of the application for a specified number of seconds.
Syntax
sleep seconds
Description
The sleep statement suspends the execution of the application for a specified number of seconds. You must use an integer literal or variable to specify the seconds.
This statement is particularly helpful when used in conjunction with the message statement to ensure that the message remains on the screen long enough for the user to read it. (However, if the statement following message is a statement that can require some time to process, adding more time with a sleep statement is unnecessary.)
Examples--sleep statement:
Example 1:
Display a message for three seconds.
exec frs message 'Please enter an employee number';
 exec frs sleep 3;
Example 2:
If an expert mode flag is set, display messages for a shorter period of time.
if (expert_mode) then
    msg_interval = 1;
else
    msg_interval = 3;
end if;
    ...
exec frs message 'Entering information form';
exec frs sleep :msg_interval;
Last modified date: 08/28/2024