Previous Topic: The Symbolic Version ListNext Topic: Set Breakpoints


Composite Support for Duplicate Subprograms

Use the COMPOSITE command to set monitoring on programs that consist of multiple subprograms that are included during link-edit, and that let you refer to the subprograms as individual programs. Use this command also to establish the current load module qualifier when a subprogram is defined, using the same monitor name, for more than one composite load module.

Given the following setup:

MAINMOD1 MAINMOD2
SUBPROG1 SUBPROG1
SUBPROG2 SUBPROG2

both MAINMOD1 and MAINMOD2 contain the same subroutines. To set unique breakpoints on the subprograms, use the following procedure.

To set unique breakpoints on subprograms

  1. Use LIST=MAINMOD1 and type COMPOSITE on the command line, and set it up for composite monitoring. Switch to MAINMOD2 and do the same for it.
  2. Overtype the current program name to SUBPROG1 and set a breakpoint by typing U on the desired location.

    This sets an unconditional breakpoint on SUBPROG1 of MAINMOD2 because the last COMPOSITE command during this transaction was on MAINMOD2.

  3. Overtype the current program to MAINMOD1, press enter, and type COMPOSITE again.

    This establishes the current composite load modules as MAINMOD1.

  4. Overtype the current program to SUBPROG1 and set a breakpoint by typing U on the desired location.

    This sets an unconditional breakpoint on SUBPROG1 of MAINMOD1.

When a source listing breakpoint occurs in a subprogram, the current load module is automatically set to the load module that owns the subprogram.