In Understanding Basic Tasking Concepts it was pointed out that there may be multiple processes running that are instances of the same object code file. Thus, the object code file title cannot serve as a unique identification for a process. Instead, the system assigns two identifying numbers to a process: the mix number and the stack number. A related type of identifying number, which applies to CANDE and MARC sessions, is the session number. In addition, the MPID task attribute can be used to identify a process. This MPID task attribute is especially useful when more than one process using the same object code file is running.
The mix number is a 5-digit number that the system assigns to each process when the process is initiated. The name arises because all the processes running on the system are collectively referred to as the system mix, and the mix number distinguishes a process from the other processes in the mix. Mix numbers identify processes in the system log as well as in many system commands and CANDE commands that affect running processes or provide information about them.
The system assigns mix numbers to WFL jobs when they are first entered into a job queue. This mix number remains the same when the WFL job leaves the queue and begins executing.
Each process or queued WFL job is generally assigned a mix number one higher than the last assigned number in the mix number pool. However, a jump in the numbering can occur after a halt/load. This jump occurs because the system periodically reserves a range of numbers for use by new processes. After a halt/load, the system avoids reusing any number in the range reserved at the time of the halt/load.
The mix number pool is determined by the maximum mix number that is configured on the system. When the system is running in an active MoreTasks state (OP+ MORETASKS or OP+ 32 followed by a halt/load), the maximum mix number can be configured between 9999 and 65535 using the MAX MIX = <number> form of the MAX (Maximums) system command. When the system is running in a nonactive MoreTasks state (OP– MORETASKS or OP– 32 followed by a halt/load), the maximum mix number is fixed at 9999.
When the mix numbers reach the maximum configured mix number, which ranges from 9999 to 65535, the number starts over at 100. Certain low numbers are reserved for some operating system processes. Also, a number cannot be reused if the last process to which it was assigned is still in the mix.
Processes can determine their own mix numbers, or the mix number of a related process, by interrogating the MIXNUMBER task attribute. However, the mix number has little use in programmatic tasking. A process accesses the task attributes of another process by specifying a particular task variable, rather than by specifying a particular mix number.
A concept related to mix numbers is that of session numbers. The system assigns session numbers to identify individual CANDE and MARC sessions. This session number is inherited by the JOBNUMBER task attribute of tasks initiated from a session.
The system selects these session numbers from either the mix number pool (determined by the value of the system command, MAX MIX = <number>), or a separate session number pool (determined by the value of the MAX SESSION = <number>). The following are the effects of this command:
-
The MAX SESSION value cannot be less than the MAX MIX value. An increase in the MAX MIX value results in a corresponding increase in the MAX SESSION value. An attempt to reduce the MAX SESSION value to be less than the MAX MIX value results in no change in the MAX SESSION value.
-
If the MAX SESSION value is the same as the MAX MIX value, then the system allocates session numbers from the mix number pool, which ranges from 100 to the MAX MIX value. The system never assigns the same number to both a process and a session.
-
If the MAX SESSION value is greater than the MAX MIX value, then the system allocates session numbers from a separate session number pool. The numbers in this pool range from the MAX MIX value +1 through the MAX SESSION value. If a session number is not available in the session number pool, a value is selected from the mix number pool.
The use of a session number pool enables many more sessions to be active than would otherwise be possible, because you can create a session number pool that is larger than the mix number pool, and none of the numbers are used as mix numbers.
Like the mix number, the stack number of a process is a number assigned by the operating system. The stack number is unique to the process and remains constant for the lifetime of the process. However, while the mix number is intended primarily for use by system operators, the stack number of a process is intended primarily for internal use by the operating system. Yet the stack number is visible to operators and programmers in the following contexts:
-
The stack number appears in the system log records for Major Type 0, Minor Type 1 (Establish Identity) and Major Type 1, Minor Types 1 (BOJ), 2 (EOJ), 3 (BOT), 4 (EOT), 5 (File Open), and 6 (File Close). The stack number is expressed in hexadecimal format.
-
The output from the OT (Inspect Stack Cell) system command includes the stack number for the process. The stack number is expressed in hexadecimal format. Thus, in the following output, the stack number is 011B:
011B STACK CELL 20= 7 09624650E003 (HEX)
-
The PROCESSID function in ALGOL returns the stack number of the process. The stack number is expressed in integer format.
-
The stack number can appear in memory dump analyses created by DUMPANALYZER. The stack number is reported in hexadecimal format.
-
The STACKNUMBER task attribute returns the stack number of a process. The stack number is returned in integer format.
The MPID attribute is not assigned by the operating system, but can be assigned to a process before initiation. The attribute remains constant for the lifetime of the process. The MPID attribute enables system operators to distinguish between multiple instances of a process using a single object code file. The value of the attribute is visible to operators in the following contexts:
-
The value is shown in response to mix-related system commands (A, C, J, LIBS, M, S, and W). It appears as a quoted string after the process name.
-
The value appears in system log records for Major Type 0, Minor Type 1 (Establish Identity), and Major Type 1, Minor Types 1 (BOJ) and 3 (BOT).

