One-time display of the value of variables

Before you begin, determine if you want to change the format in which information is displayed. Variables that are areas and structures might be easier to read if they are arranged in a tabular format on the screen. To make changes to the format, do one of the following options:

  • If you want to change the format of the output for arrays and structures to tabular format when displaying a variable, do the following steps:
    1. Move the cursor to the command line.
    2. Enter the following command: SET LIST TABULAR ON
  • If you want to change the format of the output for arrays and structures to linear format when displaying a variable, do the following steps:
    1. Move the cursor to the command line.
    2. Enter the following command: SET LIST TABULAR OFF
  • If you want to format the logged output of arrays and structures when SET AUTOMONITOR ON LOG is in effect, do the following steps:
    1. Move the cursor to the command line.
    2. Enter the following command: SET LIST TABULAR ON
    3. Enter the following command: SET AUTOMONITOR ON LOG

To display the contents of a variable once, do one of the following options:

  • By using the PF4 key, do the following steps:
    1. Scroll through the Source window until you find the variable you want to display.
    2. Move your cursor to the variable name.
    3. Press the PF4 (LIST) key. The value of the variable is displayed in the Log window.
  • By using the LIST command:
    1. Move the cursor to the command line.
    2. Type the following command, substituting your variable name for variable-name:
      LIST variable-name;
    3. Press Enter. The value of the variable is displayed in the Log window.
  • By using the L prefix command, do the following steps:
    1. Scroll through the Source window until you find the operand you want to display.
    2. Move your cursor to the prefix area of the line that contains the operand you want to display.
    3. Type in an "L" in the prefix area, then press Enter to display the value of all of the operands on that line. If you want to display the value of a specific operand on that line, do the following steps:
      1. If you are debugging a high-level language program, beginning from the left and with the number 1, assign a number to the first occurrence of each variable. For example, in the following line, rightSide is 1, leftSide is 2, and bottomSide is 3:
        rightSide = (leftSide * leftSide) + (bottomSide * bottomSide); 

        If you are debugging an assembler or disassembly program, beginning from the left and beginning with number 1 assign the each operand of the machine instruction a number.

      2. Type in an "L" in the prefix area, followed by the number assigned to the operand that you want to display. If you wanted to display the value of leftSide in the previous example, you would enter "L2" in the prefix area.
      3. Press Enter. z/OS® Debugger displays the value of leftSide in the Log window.