AT LOAD command

Gives z/OS® Debugger control when the specified load module is brought into storage. For example, z/OS Debugger gains control on completion of a successful C fetch(), a PL/I FETCH, during a COBOL dynamic CALL, MVS LOAD service, or EXEC CICS LOAD. To stop at a compile unit or program in a COBOL DLL, use AT APPEARANCE. Once the breakpoint is raised for the specified load module, it is not raised again unless either the load module is released and fetched again or another load module with the specified name is fetched.

You can set LOAD breakpoints regardless of what compiler options are in effect.

Read syntax diagramSkip visual syntax diagramATevery_clauseLOAD module_name(,module_name) load_spec(,load_spec)*command;
*
Sets a breakpoint at every LOAD of any load module.
command
A valid z/OS Debugger command.

Usage notes

  • z/OS Debugger gains control for loads that are affected by the Language Environment® load service, the MVS LOAD service, or EXEC CICS LOAD. A LOAD breakpoint is triggered when a new enclave is entered. If the Dynamic Debug facility is deactivated (by entering the SET DYNDEBUG OFF command) or SVC screening is disabled, z/OS Debugger is not notified of any loads that are affected by the MVS LOAD service. Refer to IBM® z/OS Debugger Customization Guide for instructions on how to control SVC screening.
  • AT LOAD can be used to detect the loading of specific language library load modules; however, the loading of language library load modules does not trigger an AT GLOBAL LOAD or AT LOAD *.
  • AT LOAD cannot specify the initial load module because it is already loaded when z/OS Debugger is started.
  • If this breakpoint is set in a parent enclave, it can be triggered and operated on with breakpoint commands while the application is in a child enclave.
  • For a CICS® application on z/OS Debugger, this breakpoint is cleared at the end of the last process in the application. For a non-CICS application on z/OS Debugger, it is cleared at the end of a process.
  • AT LOAD on an implicitly or explicitly loaded DLL is not supported by z/OS Debugger.
  • Depending on the version of the C or C++ compiler used, z/OS Debugger might recognize a compile unit in a DLL only after it has had a function in it called. For example, if a DLL contains a function fn1 in CU file1 and it contains a function fn2 in CU file2, a call to fn1 will not enable z/OS Debugger to recognize file2, only file1. Similarly, a call to fn2 will not enable z/OS Debugger to recognize file1.
  • At the triggering of a LOAD breakpoint for C, C++, and PL/I, z/OS Debugger has enough information about the loaded module to set breakpoints and examine variables of static and extern storage classes.
  • At the triggering of a LOAD breakpoint for COBOL, C, and C++ DLL's, z/OS Debugger does not have enough information about the loaded module to set breakpoints in blocks contained within the module. At the triggering of an APPEARANCE breakpoint, however, you can set such breakpoints.
  • The AT LOAD command cannot be used while you replay recorded statements by using the PLAYBACK commands.
Examples
  • Print a message when load module mymod is loaded. The current programming language setting is either C, C++, or COBOL.
    AT LOAD mymod LIST ("Load module mymod has been loaded");
  • Establish an entry breakpoint when load module a is fetched and then resume execution. The current programming language setting is C.
    AT LOAD a {
      AT ENTRY a;
      GO;
    }

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