HP 3000 Manuals

PAUSE [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Commands Reference Manual Volume I

PAUSE 

Allows the user to suspend current activity for a specified number of
seconds.  (Native Mode)


NOTE This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.
Syntax PAUSE seconds Parameters seconds The number of seconds to suspend activity. This number must be equal to or greater than zero and less than or equal to the value of HPTIMEOUT if that variable is set. HPTIMEOUT is ignored if it is less than or equal to zero. Operation Notes The value of this command lies in providing a way to suspend one activity while another process waits for a specific condition to exist, for example, forcing a job to "idle" while waiting for the creation of a key file or the setting of a crucial flag. You may use several MPE/iX commands to query user or system variables, or the system itself, in order to verify the existence of the desired condition. Use This command is available from a program or in BREAK. You can execute BREAK while PAUSE is active. BREAK terminates the pause. Example If a job must read data from a file called LOGDAT.GXK.PROCCTRL, which is to be created by a session, then the job may suspend activity pending a test for the existence of the vital file. The example below shows how the PAUSE command can be used to synchronize a session to some job activity via the existence of a known file: STREAM JLOGEND #J123 ... ... SETVAR START_CPU HPCPUSECS WHILE NOT FINFO("LOGDAT.GXK.PROCCTRL","EXISTS") AND & HPCPUSECS-START_CPU <5 DO PAUSE 2 ENDWHILE DELETEVAR START_CPU
NOTE The CPU seconds used by the WHILE loop is not allowed to exceed 5 seconds.
If the file does not exist and the WHILE loop has consumed less than five CPU seconds, then the job pauses for two seconds. This pause does not use CPU-time. The CPU check is included to prevent an infinite loop that may result if JLOGEND aborted unexpectedly and thus did not get a chance to build the LOGDAT file. Related Information Commands WHILE, INPUT Manuals None


MPE/iX 5.0 Documentation