HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary


Previous Contents Index


WAIT

Places a process into a wait state for the specified amount of time. The WAIT command is used in a command procedure to delay processing of either the procedure itself or a set of commands in the procedure.

Format

WAIT delta-time


Parameter

delta-time

Specifies a delta time interval in the following format. (A delta time is an offset from the current time to a time in the future.)

hour:minute:second.hundredth

The fields on the format line indicate the following:

hour Specifies an integer in the range 0 to 23.
minute Specifies an integer in the range 0 to 59.
second Specifies an integer in the range 0 to 59.
hundredth Specifies an integer in the range 0 to 99.

The colons (:) and period (.) are required delimiters; also, the delta time must begin with the number of hours and not a colon. Note that the days field, usually included in the delta time format, must be omitted here.

For more information on specifying delta time values, see the OpenVMS User's Manual or the online help topic Date.

Note that if you enter the WAIT command interactively, you are not prompted for a time value; however, in order for the command to have any effect, you must supply a time value.


Description

If you enter the WAIT command interactively, your current process is placed in a wait state and you cannot enter any more commands until the waiting period is over. (You can, however, receive unsolicited messages from other processes.) Press Ctrl/C or Ctrl/Y to restore normal terminal interaction.

Example


$ LOOP:
$ RUN KUDOS
$ WAIT 00:10
$ GOTO LOOP
      

In this example, the command procedure executes the program image KUDOS. After the RUN command executes the program, the WAIT command delays execution of the GOTO command for 10 minutes. Note that 00 is specified for the number of hours, because the time specification cannot begin with a colon. After 10 minutes, the GOTO command executes, and the procedure transfers control to the label LOOP and executes the program KUDOS again. The procedure loops until it is interrupted or terminated.

If the procedure is executed interactively, terminate it by pressing Ctrl/C or Ctrl/Y and by entering the STOP command or another DCL command that runs a new image in the process. If the procedure is executed in a batch job, enter the DELETE/ENTRY command to terminate it.


Previous Next Contents Index