AT ALLOCATE (PL/I) command

AT ALLOCATE gives z/OS® Debugger control when storage for a named controlled variable or aggregate is dynamically allocated by PL/I. When the AT ALLOCATE breakpoint occurs, the allocated storage has not yet been initialized; initialization, if any, occurs when control is returned to the program.

Read syntax diagramSkip visual syntax diagramATevery_clauseALLOCATEidentifier(,identifier)*command;
identifier
The name of a PL/I controlled variable whose allocation causes an invocation of z/OS Debugger. If the variable is the name of a structure, only the major structure name can be specified.
*
Sets a breakpoint at every ALLOCATE.
command
A valid z/OS Debugger command.

Usage notes

  • The AT ALLOCATE command is not available to debug Enterprise PL/I programs.
  • The AT ALLOCATE command cannot be used while you replay recorded statements by using the PLAYBACK commands.

Examples

  • When the major structure area_name is allocated, display the address of the storage that was obtained.
    AT ALLOCATE area_name LIST ADDR (area_name);
  • List the changes to temp where the storage for temp has been allocated.
    DECLARE temp CHAR(80) CONTROLLED INITIAL('abc');
    
    AT ALLOCATE temp;
      BEGIN;
        AT CHANGE temp;
          BEGIN;
            LIST (temp);
            GO;
          END;
        GO;
      END;
    GO;
    
    temp = 'The first time.';
    temp = 'The second time.';
    temp = 'The second time.';

    When temp is allocated the value of temp has not yet been initialized. When it is initialized to 'abc' by the INITIAL phrase, the first AT CHANGE is recognized and 'abc' is listed. The three assignments to temp cause the value to be set again but the third assignment doesn't change the value. This example results in one ALLOCATE breakpoint and three CHANGE breakpoints.

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