From the time a process is initiated until it terminates, it is considered an in-use process. An in-use process can pass through several process states. These process states indicate whether the process is currently executing, and if not, why not.
When a process is not in use, the task variable for that process stores any of several process states. These process states specify if the process has not been initiated, if initiation failed, or if the process has terminated. It is possible for the task variable to store this information because the task variable of a process exists before the process is initiated and continues to exist after the process terminates. In the following WFL example, task variable T is created when the system executes the declaration TASK T, and continues to exist until the system executes the END JOB statement:
?BEGIN JOB; TASK T; RUN OBJECT/PROG [T]; . . . ?END JOB
Information about process status is available through several mechanisms, including the STATUS task attribute, the task state expression in WFL, mix display commands, and the STACK STATE line of the Y (Status Interrogate) system command output. Each of these programming constructs and system commands uses a slightly different terminology to portray process status. Process States shows the possible values of the STATUS task attribute and the corresponding status values returned by the other process monitoring methods. The meanings of the various process states are discussed in the subsections following the table.
Table 4. Process States
|
STATUS Task Attribute |
WFL Task State |
Mix Display Commands |
STACK STATE in Y Display |
|---|---|---|---|
|
NEVERUSED |
None |
None |
None |
|
SCHEDULED |
Both of these:
|
Both of these:
|
One of these:
|
|
ACTIVE |
Both of these:
|
All of these:
|
One of these:
|
|
SUSPENDED |
Both of these:
|
Both of these:
|
Waiting on an event |
|
FROZEN |
Both of these:
|
LIBS (Library Task Entries) |
Frozen |
|
GOINGAWAY |
None |
None |
None |
|
BADINITIATE |
ABORTED |
None |
None |
|
TERMINATED |
One or more of these:
|
C (Completed Mix Entries) |
None |
| Note: | GOINGAWAY is a write-only value. That is, assigning GOINGAWAY actually changes the STATUS value to ACTIVE, with additional effects that are described under Thawing a Library later in this section. |

