Modifying the value of a PL/I variable

To list the contents of a single variable, move the cursor to an occurrence of the variable name in the Source window and press PF4 (LIST). The value is displayed in the Log window. This is equivalent to entering LIST TITLED variable on the command line. For example, run the PLICALC program to the statement labeled  CALC1  by entering AT 22 ; GO ; on the z/OS® Debugger command line. Move the cursor over NUM and press PF4 (LIST). The following appears in the Log window:
 LIST NUM ;
NUM =             18

To modify the value of NUM to 22, type over the NUM = 18 line with NUM = 22, press Enter to put it on the command line, and press Enter again to issue the command.

You can enter most PL/I expressions on the command line.

Now step into the call to PUSH by pressing PF2 (STEP) and step until the statement labeled  PUSH1  is reached. To view the attributes of variable STKNUM, enter the z/OS Debugger command:

DESCRIBE ATTRIBUTES STKNUM;

The result in the Log window is:

 ATTRIBUTES FOR STKNUM
   ITS ADDRESS IS  0003944C AND ITS LENGTH IS 200
     PUSH : STACK.STKNUM(50)  FIXED BINARY(31,0) REAL PARAMETER
         ITS ADDRESS IS  0003944C AND ITS LENGTH IS 4

You can list all the values of the members of the structure pointed to by STACK with the command:

LIST STACK;

with results in the Log window appearing something like this:

 LIST STACK ;
STACK.STKPTR =                 2
STACK.STKNUM(1) =              2
STACK.STKNUM(2) =             18
STACK.STKNUM(3) =         233864
⋮
STACK.STKNUM(50) =        121604

You can change the value of a structure member by issuing the assignment as a command as in the following example:

STKNUM(STKPTR) = 33;