
Chapter 6 429
Command Definitions P-R
PAUSE
sessions without a job name. When more than one job or session matches
jobid PAUSE sleeps while all matching jobs are in their "while_state". If the
job executing PAUSE matches jobid it will not be selected.
interval_secs If interval_secs is specified PAUSE sleeps for this many seconds between
attempts to see if jobid is still in its "while_state". Otherwise, PAUSE sleeps
a variable amount of seconds depending on the job state and the number of
previous times a particular job has been polled. This computed method
favors executing jobs that terminate quickly.
EXIST (default) means to pause while all jobs and sessions matching "jobid" exist.
These jobs can be scheduled, waiting, executing, etc., but as long as the
SHOWJOB command displays one or more of the jobs defined by "jobid",
the pause continues
WAIT means to pause while the selected job or jobs are waiting. As soon as all
the matching jobs are no longer waiting (meaning all the job states are no
longer "introduced", "waiting", or "scheduled") the pause ends. The life
cycle of a job is typically: [sched or waiting->] intro-> initializing-> exec->
[susp-> exec->] terminate. Waiting jobs are considered all job states left of
and excluding "initializing". Non-waiting jobs are all jobs right of and
including "initializing"
NOTEXIST means to pause while the matching job or jobs do not exist. As soon as any
jobs matching "jobid" exist (in any state) the pause completes. PAUSE
might miss finding jobs that log off quickly. This is particularly true for a
match on a single job/session number. A more practical use might be:
PAUSE job=@J;notexist
which means to sleep while no jobs exist. As soon as the first job is
streamed the above pause stops.
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.
In its simpliest form, the PAUSE command sleeps for "num_seconds", or less if BREAK is
pressed. In this simple case no "jobid" is specified and all other command arguments are
ignored. If the "jobid" parameter is specified then "interval_secs" and the remaining
command parameters are relevant. When "jobid" is supplied PAUSE typically sleeps until
the jobs or sessions matching "jobid" have terminated.
Use
This command is available from a program or in BREAK. You can execute BREAK while
PAUSE is active. BREAK terminates the pause.