Setting test points
Paragraphs and sections of the contained program in which the interrupt point lies can be referenced without qualification.
Sections and paragraphs in a different program, which may also lie in a different compilation unit, are accessed via the S and PROC qualification:
%INSERT [S=program-id.]PROC=program-id-contained.paragraph [IN section]
The S qualification must be specified whenever the test point is to be set in a different, separately compiled program.
A test point at the start of the Procedure Division of the outermost containing program can be set by means of a PROG qualification:
%INSERT PROG=program-id.program-id
or written out in full:
%INSERT S=program-id.PROC=program-id.program-id
This method is only meaningful if the program-id does not exceed 8 characters or if an LLM was generated, since otherwise the source name, but not the procedure name, would be truncated to 8 characters.
It is not possible to set a test point at the start of a contained program by using a PROG qualification, since S and PROC are different. This can, however, be achieved as follows:
%INSERT [S=program-id.]PROC=program-id-contained.program-id-contained
Names that are unique in the current compilation unit can also be addressed without any qualification.
Accessing data
%D locates the data of the current nested program and also data having the GLOBAL attribute that is not locally concealed, i.e. it is possible to access the same data that the program itself can also access at this point.
%SD can be used to give the data of all the surrounding programs, in accordance with the current call hierarchy.
The PROC qualification can be used to specifically access one item of data from a different program.
%D PROC=program-id-contained.data-item
%SD is also possible here instead of %D provided the item of data lies in a calling program.
Depending on how the program is nested, the PROC qualification can be repeated more than once when accessing both test points and data.
The %TRACE command logs all statements of the current CSECT, i.e. including all statements of the called contained programs, but not including the statements in separately compiled programs.
If the statement types are indicated in the trace, additional LABEL specifications are occasionally reported by AID on account of internally generated paragraphs.