LIST STORAGE command

Displays the contents of storage at a particular address in hexadecimal or XML format.

Read syntax diagramSkip visual syntax diagramLISTSTORAGE( addressreference'reference' ,offset,length )XML(EBCDICASCIICODEPAGE(ccsid));
address
The starting address of storage to be listed.
reference
A variable whose storage location is to be listed.

In assembler or disassembly, this operand might be specified as any assembler expression that represents a storage location. If the assembler expression does not have an implied length (for example, R3->+10), you must specify the number of bytes to display by using the integer operand.

'reference'
A LangX COBOL variable whose storage location is to be listed. A LangX COBOL reference must be enclosed in apostrophes (').
offset
The decimal or hexadecimal number of bytes indicating the starting offset from the memory location pointed to by the reference's address or the address provided by the user. offset can be a negative number. If offset is a hex constant, you must follow the same syntax rules for address. The default is 0.
length
The decimal number of bytes of storage displayed. The default is 16 bytes. The length must be an integer number.
XML
Indicates that the specified area contains a complete XML 1.0 or 1.1 document. The specified area is passed to the z/OS® XML parser for processing. If the parser detects any syntax errors, the error data is shown in the z/OS Debugger log. Otherwise, z/OS Debugger displays a formatted version of the XML document in the z/OS Debugger log file.
EBCDIC
Indicates that the specified area contains EBCDIC characters.
ASCII
Indicates that the specified area contains ASCII characters.
CODEPAGE
Indicates that the specified area contains characters in the specified code page.
ccsid
Specifies the Coded Character Set Identifiers used to encode the XML. z/OS Debugger uses the z/OS Unicode Services to convert the characters in the XML from this code page to the code page specified by the EQAOPTS CODEPAGE command before the characters are displayed on the 3270 terminal. The ccsid can be a decimal number in the range 1 to 65535.

Usage notes

  • For C and C++, if reference is a pointer, z/OS Debugger displays the contents at the address given by that pointer.
  • Using z/OS Debugger, cursor pointing can be used by typing the LIST STORAGE command on the command line and moving the cursor to a variable in the Source window before pressing Enter, or by moving the cursor and pressing a PF key with the LIST STORAGE command assigned to it.
  • When using the LIST STORAGE command in z/OS Debugger for a variable that is located by the cursor position, the variable's name cannot be split across different lines of the source listing.
  • If the referenced variable is a General Purpose Register (GPR) such as %GPR1, the result depends on the programming language that is in effect:
    • For all languages except assembler and disassembly, z/OS Debugger displays the storage at the address contained in the referenced GPR.
    • For assembler and disassembly, you must use the indirection notation (%GPR1->) to instruct z/OS Debugger to display the storage at the address contained in the referenced register.
  • If no operand is specified with LIST STORAGE, the command is cursor-sensitive.
  • If you are replaying recorded statements by using PLAYBACK commands, the LIST STORAGE command displays the contents of storage at the point where you entered the PLAYBACK START command.
  • For optimized COBOL programs, LIST STORAGE cannot display variables that were discarded by the optimizer.
  • XML is supported only when you run on z/OS Version 1.8 or later.
  • If you specify XML but not EBCDIC, ASCII, nor CODEPAGE, z/OS Debugger attempts to detect if the encoding of the XML document is EBCDIC or ASCII.
  • Some information in the XML document (for example, most of the DTD specification and some white space) might not be listed because the z/OS XML parser does not return it to z/OS Debugger.
  • If you specify address with more than 8 significant digits or if reference references 64-bit addressable storage, z/OS Debugger assumes that the storage location is 64-bit addressable storage. Otherwise, z/OS Debugger assumes that the storage location is 31-bit addressable storage.

Examples

  • Display the first 64 bytes of storage beginning at the address of variable table.
    LIST STORAGE (table, 64);
  • Display 16 bytes of storage at the address given by pointer table(1).
    LIST STORAGE (table(1));
  • Display the 16 bytes contained at locations 20CD0-20CDF. The current programming language setting is COBOL.
    LIST STORAGE (H'20CD0');
  • Display the 16 bytes contained at locations 20CD0-20CDF. The current programming language setting is PL/I.
    LIST STORAGE ('20CD0'PX);
  • In the disassembly view, display the storage at the address given by register R13.
    LIST STORAGE (R13->);
  • Display 10 characters starting at offset 2 for variable MYVAR. MYVAR is declared as CHAR (20).
    LIST STORAGE (MYVAR, 2, 10);
  • Display 20 bytes starting at offset 10 from address '20ACD0'PX. The current programming language setting is PL/I.
    LIST STORAGE ('20ACD0'PX, 10, 20);
  • Display 10 bytes starting at offset -5 from address '20ACD0'PX. The current programming language setting is PL/I.
    LIST STORAGE ('20ACD0'PX, -5, 10);

Refer to the following topics for more information related to the material discussed in this topic.