STACK (Format Stack Contents)

The STACK command displays the formatted and interpreted contents of a stack.

Syntax

── STACK ──<first parameter>──<second parameter>───────────────────────┤

<first parameter>

──┬─ ACTIVE ─────┬─────────────────────────────────────────────────────┤
  ├─ ALL ────────┤
  ├─ DATABASE ───┤
  ├─ DUMPING ────┤
  │ ┌◄─── , ───┐ │
  └─┴─<number>─┴─┘

<second parameter>

──┬──────────────────────────────────────────────────────────┬─────────┤
  ├─ HISTORY ──────────────────────────────────────┬─┬───────┤
  ├─ SUMMARY ──────────────────────────────────────┤ └─ PIB ─┘
  └─ OFFSET ──<simple value>─┬─────────────────────┤
                             └─ - ──<simple value>─┘

Explanation

Refer to “Basic Constructs” earlier in this section for information about the <number> and<simple value> constructs.

<first parameter>

Specifies the stack or set of stacks to be displayed.

The following tables describes the elements of the first parameter:

Specify . . .

To display . . .

ACTIVE

All stacks that are alive or active at the time of the dump, including the stack that is performing the dump.

ALL

All stacks on the system.

DATABASE

All task stacks that use Data Management System II (DMSII), including database stacks and database task stacks.

DUMPING

The stack performing the dump. If a different stack initiated the dump, then the initiating stack is also displayed.

<number>

All the stacks indicated by the number.

<second parameter>

Restricts the display of the stack or stacks. If no restriction is present, the entire stack and its process information block (PIB) are displayed. The following table describes the options of the second parameter:

Specify . . .

To display . . .

HISTORY

The MSCWs and RCWs in the stack or stacks. In HARDWAREINTERRUPT environments, the P1 and P2 parameters are also shown and analyzed.

SUMMARY

The summary information for the stack or stacks.

OFFSET <simple value>

The contents of the stack or stacks starting at the offset specified by the simple value and continuing to the base of the stack.

OFFSET <simple value> -<simple value>

The contents of the stack or stacks between the two specified offsets. Note that the first simple value must be greater than the second simple value.

PIB

The PIB of the stack.

Example 1

The following example lists stack 368 from 10B to F5.

STACK 368 OFFSET 10B - F5

Examples 2 through 4

Examples 2 through 4 present a complete example of the output of the STACK command.

Process Stack (Example 2)

The first part of the STACK command output, shown in the Process Stack example output, includes the following items:

Item

Meaning

STACKDUMP FOR STACK <number>

Specifies the stack number.

MIX NUMBER

Lists the job number and mix number for the process.

NAME

Lists the name of the process, in this case ONESECONDBURDEN.

JOB MESSAGES

Lists RSVP, DISPLAY, or ACCEPT messages for the process. Up to 250 ACCEPT messages may appear, but only if you have set the QUEUEDAX SYSOPS option.

STACK KIND

Lists the type of process, in this case “I.R.” for “independent runner.”

STATUS

Lists the current status of the process.

PROCESS TYPE

Lists the process type as recorded by the TYPE task attribute. The process type is one of the following types:

  • CALL (synchronous task)

  • PROCESS (asynchronous task)

  • RUN (job written in a language other than WFL)

  • JOBSTACK (WFL job)

BOSR

Lists the absolute memory address of the base of the stack area.

LOSR

Lists the absolute memory address of the upper limit of the stack area.

LENGTH

Lists the length of the stack area in hexadecimal and decimal notation.

Following these items is a listing of the contents of each word in the process stack, starting with the S-register and working down, one word on each line. Each entry is divided into columns, from left to right. The contents of each column are shown in the following table:

Column

Contains . . .

1

A 4–digit hexadecimal number that identifies the offset of the word from the base of the stack.

2

Address couples (such as 01, 000C) that specify the lexical level and offset of items declared in each procedure.

3

The contents of the word, expressed in hexadecimal representation. The leading digit expresses the tag bits. The remaining 48 bits are represented by two groups of six hexadecimal digits. Each hexadecimal digit represents a group of four bits, starting with [47:4] and ending at [3:4].

4

An analysis of the contents of the word.

The following table explains the analyses for various types of words:

Type of Word

Description

Operands

Print in octal, decimal, or EBCDIC representation according to the following rules:

  • Decimal operand values appear in integer, fixed-point, or exponential notation, as appropriate.

  • EBCDIC operands appear in EBCDIC representation only if all characters are graphics. However, if an operand contains right-justified EBCDIC characters with null fill, the EBCDIC characters are printed.

  • The MODE command specifies the modes that control the expansion of various types of words.

DESC (word data descriptor)

Indicates whether or not data is present in main memory; whether the descriptor is a copy or mom descriptor; the type and length of the data item; and (if required) the address of the data item.

DPOP (double-precision operand)

Indicates the value of each word in octal, scientific, and double-precision scientific notation.

MSCW (mark stack control word)

Indicates the position of the previous MSCW. MSCWs are easy to see because they are preceded by an asterisk (*).

PCW (program control word)

Includes the lexical level of the procedure being entered, the segment number and relative address within the segment in which procedure entry occurs, and the interrupt state.

RCW (return control word)

Includes the lexical level, state (control state or normal state), segment number, relative address within the segment in which procedure entry occurred, and the sequence number of the record in which the procedure is located in the source file. The RCW analysis is followed by the following entries:

  • SEG DESC (segment descriptor) analysis, which includes the name of the procedure referenced by the row.

  • CODE analysis, which includes right and left angle brackets (>  <) around the word in which procedure entry occurred.

SCW (software control word)

Specifies the type or dimension of arrays, the type of declaration (file, interrupt, or fault), or the presence of a nonlocal GO TO statement.

SIRW (stuffed indirect reference word)

Indicates the offset into the specified process stack.

SIW (step index word)

Indicates the current value, increment value, and final value of an iteration statement.

Process Information Block (Example 3)

The second part of the STACK command output, shown in Process Information Block output example, starts with a pointer to the SPIBVECTOR, which is parallel to the stack vector and stores descriptors for active process information blocks (PIBs). Then, for each word in the PIB, the output shows an entry divided into the following columns, from left to right:

  • The hexadecimal offset of the word in the PIB.

  • The hexadecimal contents of the word.

  • Analysis of the contents of the word.

Task Attribute Block (Example 4)

The third part of the STACK command output, shown in the Task Attribute Block example output, shows the contents of the task attribute block (TAB) for the process. The format of this output is similar to that used for the PIB printout. Note that arrows (=>) appear in front of active task attributes. Following the TAB listing is a dump of the contents of the environment TAB for the process.