Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

MEMORY


COBOL

PL/I

Assembler

C Language

Description

Use the MEMORY command to view an area in memory. The Memory screen is displayed showing the specified area in dump format. Each Memory screen is written to the session log, unless suppressed by the SET LOG MEMORY OFF command.

You can also enter the MEMORY command as a line command.

Input

image2021-2-16_11-19-26.png

MEMORY Line Command Syntax

M - Display memory starting from the address associated with the line

The following are the parameter descriptions for the MEMORY command:

statement-number

A program statement number.

line-number

A SEQNBR of a line in a C compile listing.

paragraph-name

A COBOL paragraph name in the current module.

label-name

The entry in the name field of an Assembler, C, or PL/I language statement.

program-name

The name of the module or subroutine to be tested.

module-name

The name of a module or CSECT. If the module exists in the current load module, enter the module-name followed by a single colon (:). If the module is not in the current load module, the module-name must be preceded by the load module name and double colons (::) and be followed by a single colon (:).

procedure-name

A PL/I procedure name in the current module.

function-name

A C language function name in the current module.

data

A COBOL data-name or data item.

An Assembler data-label or register (Rn).

A PL/I variable.

An IBM C variable-name.

address

A 24-, 31-, or 64-bit address.

To reference a 64-bit address, you must enter the SET MODE 64 command before entering the MEMORY command. When typing a 64-bit address, use an underscore character to separate the high-order fullword from the low-order fullword; for example, MEMORY 00000001_00000100. Code Debug allows you to enter a shortcut instead of all 17 characters of the address. Partial values are right-justified within the fullword and zero-filled to the left.

17 Characters

Shortcut

00000001_00000100

1_100

00000001_00123456

1_123456

00000001_00000000

1_

offset

Identifies an area in storage relative to the beginning of the area. It must include a plus sign (+) followed by a valid hexadecimal number.

Usage Notes

ALL Languages

  1. When specifying a storage location, an offset is indicated by a plus (+) sign followed by a valid hexadecimal number. A statement number or address is indicated without the plus sign.
  2. If you are requesting memory on a module name, you must use the qualification syntax. See to Command Qualification Rules for additional information.
  3. If the referenced location does not contain a valid address, Code Debug TSO does not display memory and issues one of the following messages:

      EITHER OFFSET OR STARTING ADDRESS IS INVALID

      STORAGE IS PROTECTED - MAY BE 24-BIT ADDRESS TRY %

      STORAGE IS PROTECTED - MAY BE 31-BIT ADDRESS TRY ?

      STORAGE IS PROTECTED - 64-BIT ADDRESS IS IN PROTECTED STORAGE.
  4. If a wide terminal (132 columns) is used, the Memory screen displays 32 bytes of data per line instead of the 16 bytes displayed on an 80-column terminal.
  5. The Memory screen is scrollable. UP MAX or TOP displays memory from the start of the module, and DOWN MAX or BOTTOM displays memory to the end of the module. You can scroll further up from the **** TOP OF DATA **** or down from the **** BOTTOM OF DATA ****.
  6. The Memory screen shows the base address of the program on the left side of the column template and displays the line command area in offsets rather than in statement numbers. You can change the format of the line command area by entering LINE 24 (24-bit mode addresses), LINE 31 (31-bit mode addresses), or the default value LINE OFFSET.
  7. Line commands supported in the Memory screen are X (Exclude), T (Template), F (First), L (Last), and D (Delete). These commands are listed alphabetically in this space, with X appearing with the EXCLUDE command. The Fn and Ln line commands are not supported.
  8. The Memory screen contains both hexadecimal and character format. You can type over any unprotected hexadecimal and character values to change their values.

    Important

    A character value that is overtyped with the Code Debug non-display character will not be changed.

  9. Use the END, LOCATE *, or SOURCE command to return to the source display screen, or the GO command to resume execution.

Assembler

  1. MEMORY Rn displays the register content, whereas MEMORY Rn? (31-bit mode), Rn% (24-bit mode), or Rn! (64-bit mode) displays memory starting from the address contained in register n. The register contents reflect the value of the register at the time of the most recent breakpoint. You must enter the SET MODE 64 command before entering the MEMORY Rn! command.
  2. If the label is part of a DSECT for which addressability has not been established, Code Debug TSO does not display memory and issues a message:
      NO ADDRESSABILITY FOR DSECT
  3. Code Debug TSO displays breakpoints as X'00' on the Memory screen in Assembler programs. A VERIFY command entered on the statement displays the code before the breakpoint was set.
  4. The LINE STATEMENT command is not applicable in the Memory Display screen. Code Debug TSO displays the base address on the left side of the column template if the line command area is formatted with offsets.

Examples

ALL Languages

  1. When you enter the MEMORY command on the primary command line, the contents of the storage area located at the start of the program are displayed, as shown in the following figure.
    The fifth line on the Memory screen contains a column template that starts with zero and continues to E, skipping every other digit and replacing the digit with a dash (-). The first data line contains the address being pointed to.
    Result of Entering the MEMORY Command 

    ----------------------------- CODE DEBUG TSO - MEMORY --------------------------
    COMMAND ===>                                                    SCROLL ===> PAGE
    PROGRAM:  TRIMAIN   MODULE: TRIMAIN   COMP DATE: 09/08/1994  COMP TIME: 14:38:07
    ------------------------------------------------------ Before TRIMAIN/AMODE 24 --
    BASE = 00106F68 0 - 2 -    4 - 6 -    8 - A -    C - E -    =  0-2-4-6-8-A-C-E-
    *******************************************************************************
      000000  ===> 90ECD00C   185D05F0   4580F010   E3D9C9D4   =  ..}..).0..0.TRIM
      000010  ===> C1C9D540   E5E2D9F1   0700989F   F02407FF   =  AIN VSR1....0...
      000020  ===> 96021034   07FE41F0   000107FE   00095E94   =  .......0......|.
      000030  ===> 00084718   00084718   00084BC0   00084958   =  ...........{....
      000040  ===> 00084C44   00084E9A   00000000   00000000   =  ................
      000050  ===> 00000000   00000000   00000000   00000000   =  ................
      000060  ===> 00000000   00000000   00000000   00000000   =  ................
      000070  ===> 00000000   00000000   00000000   00000000   =  ................
      000080  ===> 00000000   00000000   40F84BF5   F54BF3F3   =  ........14.38.07
      000090  ===> E2C5D740   40F86B40   F1F9F9F3   00000000   =  SEP  8, 1994....
      0000A0  ===> C5D8E4C9   D3C1E3C5   D9C1D340   E3D9C9C1   =  EQUILATERAL TRIA
      0000B0  ===> D5C7D3C5   E2000000   00C9E2D6   E2C3C5D3   =  NGLES....ISOSCEL
      0000C0  ===> C5E240E3   D9C9C1D5   C7D3C5E2   40400000   =  ES TRIANGLES....
      0000D0  ===> 0000E2C3   C1D3C5D5   C540E3D9   C9C1D5C7   =  ..SCALENE TRIANG
      0000E0  ===> D3C5E240   40404000   000000C9   D5E5C1D3   =  LES    ....INVAL
      0000F0  ===> C9C440E3   D9C9C1D5   C7D3C5E2   40404040   =  ID TRIANGLES....
      000100  ===> 00000000   00000000   00000000   00000000   =  ................
      000110  ===> 00000000   00000000   00000000   00000000   =  ................

  2. In PL/I, pointer (->) qualification can be used for data items, if needed. For example,
    MEM ZPTR_2 -> Y_REC
    displays a screen similar to the following figure.
    Memory Screen Showing Pointer Qualification 

    ----------------------------- CODE DEBUG TSO - MEMORY --------------------------
    COMMAND ===>                                                    SCROLL ===> PAGE
    PROGRAM:  CMAIPLI1   MODULE: CMAIPLI  COMP DATE: 01/09/1995  COMP TIME: 19:03:45
    ------------------------------------------------- Before CMAIPLI1:65/AMODE 24 --
    BASE = 0016F43C 0 - 2 -    4 - 6 -    8 - A -    C - E -    =  0-2-4-6-8-A-C-E-
    ******************************** TOP OF DATA ***********************************
      000000  ===> 40404040   40404040   0007E3C5              =          ..TE
    ***************************** BOTTOM OF DATA ***********************************



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*