TEST

The TEST option specifies the level of testing capability that the compiler generates as part of the object code. You can use this option to control the location of test hooks and to control whether to generate a symbol table.

The NOTEST option suppresses the generation of all testing information.

Read syntax diagramSkip visual syntax diagramNOTESTTEST(,ALLBLOCKNONEPATHSTMTHOOKNOHOOKNOSEPARATESEPARATESEPNAMENOSEPNAMENOSOURCESOURCESYMNOSYM)
ALL
Causes the compiler to generate a statement table, and if the HOOK suboption is in effect, inserts hooks at all possible locations and generates a statement table.
Note: Under opt(2) and opt(3), hooks are set only at block boundaries.
BLOCK
Causes the compiler to generate a statement table, and if the HOOK suboption is in effect, tells the compiler to insert hooks at block boundaries (block entry and block exit).
NONE
No hooks are put into the program.
PATH
Causes the compiler to generate a statement table, and if the HOOK suboption is in effect, tells the compiler to insert hooks at these places:
  • Before the first statement enclosed by an iterative DO statement
  • Before the first statement of the true part of an IF statement
  • Before the first statement of the false part of an IF statement
  • Before the first statement of a true WHEN or OTHERWISE statement of a SELECT group
  • Before the statement following a user label, excluding labeled FORMAT statements

    If a statement has multiple labels, only one hook is inserted.

  • At CALLs or function references - both before and after control is passed to the routine
  • At block boundaries
STMT
Causes the compiler to generate a statement table, and if the HOOK suboption is in effect, inserts hooks at statement boundaries and block boundaries.
HOOK
Causes the compiler to insert hooks into the generated code if any of the TEST suboptions ALL, STMT, BLOCK, or PATH are in effect.
NOHOOK
Causes the compiler not to insert hooks into the generated code.

For IBM® Debug Tool to generate overlay hooks, one of the suboptions ALL, PATH, STMT, or BLOCK must be specified, but HOOK need not be specified, and NOHOOK would in fact be recommended.

If NOHOOK is specified, ENTRY and EXIT breakpoints are the only PATH breakpoints at which Debug Tool will stop.

SEPARATE
Causes the compiler to place most of the debug information it generates into a separate debug file. Using this option will substantially reduce the size of the object deck created by the compiler when the TEST option is in effect.

If your program contains GET or PUT DATA statements, the separate debug file will contain less debug information because those statements require that symbol table information be placed into the object deck.

The generated debug information always includes a compressed version of the source that is passed to the compiler. This means that the source might be specified by using SYSIN DD *, or that the source might be a temporary data set that is created by an earlier job step (for example, the source might be the output of the old SQL or CICS® precompilers). The suboptions that you specify for the LISTVIEW option control the content of the source.

If SEPARATE is used in a batch compilation, the JCL for that compilation must include a DD card for SYSDEBUG that must name a data set with RECFM=FB and with 80 <= LRECL <= 1024.

This suboption cannot be used with the LINEDIR compiler option.

NOSEPARATE
Causes the compiler to place all of the debug information it generates into the object deck.

Under this option, the generated debug information will not include a compressed version of the source passed to the compiler. This means that the source must in a data set that can be found by Debug Tool when you try to debug the program.

SEPNAME
Causes the compiler to place the name of the separate debug file into the object deck.

This option is ignored if the SEPARATE option is not in effect.

NOSEPNAME
Causes the compiler not to place the name of the separate debug file into the object deck.

This option is ignored if the SEPARATE option is not in effect.

SOURCE
Causes the compiler to include in a no-load class in the generated object file all the source files in the same compressed format used for the TEST(SEPARATE) option when the GOFF option is also specified.
NOSOURCE
Causes the compiler not to include in a no-load class in the generated object file all the source files in the same compressed format used for the TEST(SEPARATE) option when the GOFF option is also specified.
SYM
Creates a symbol table that allows you to examine variables by name.
NOSYM
No symbol table is generated.
Notes:
  • Under LP(64), no hooks are generated, and the SEP or NOSEP compiler option is ignored.
  • Under opt(2) or opt(3), hooks are set only at block boundaries. This means that debugging of optimized code is effectively limited to tracing entry and exit to PROCEDUREs and BEGIN blocks.
  • You must use Debug Tool Version 6 (or later) to debug code compiled with the SEPARATE compiler option.
  • There is no support for an input file that spans concatenated data sets.

Specifying TEST(NONE,NOSYM) causes the compiler to set the option to NOTEST.

Use of TEST(NONE,SYM) is strongly discouraged, and it is unclear what is intended when you specify these settings. You would probably be much better off if you specified TEST(ALL,SYM,NOHOOK) or TEST(STMT,SYM,NOHOOK).

Any TEST option other than NOTEST and TEST(NONE,NOSYM) will automatically provide the attention interrupt capability for program testing.

If the program has an ATTENTION ON-unit that you want invoked, you must compile the program with either of the following options:
  • The INTERRUPT option
  • A TEST option other than NOTEST or TEST(NONE,NOSYM)
Note: ATTENTION is supported only under TSO.

The TEST option will imply GONUMBER.

Because the TEST option can increase the size of the object code and can affect performance, you might want to limit the number and placement of hooks.

If the TEST option is specified, no inlining will occur.

Structures with REFER are supported in the symbol table.

If TEST(SYM) is in effect, the compiler will generate tables to enable the automonitor feature of Debug Tool. These tables might substantially increase the size of the object module unless the TEST(SEPARATE) option is in effect. When the automonitor feature of Debug Tool is activated, these tables are used to display the values of the variables used in a statement before the statement executes - as long as the variable has computational type or has the attribute POINTER, OFFSET or HANDLE. If the statement is an assignment statement, the value of the target is also displayed; however, if the target has not been initialized or assigned previously, its value is meaningless.

Any variable declared with an * for its name is not visible when you use Debug Tool. Additionally, if an * is used as the name of a parent structure or substructure, all of its children are also invisible. Therefore, it might be better to use a single underscore for the name of any structure elements that you want to leave "unnamed".