Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

INTERCEPT


COBOL

PL/I

Assembler

C Language

Description

Use the INTERCEPT command in interactive mode to load the program and set before and after breakpoints. When testing interactively in BTS or dialog box, the INTERCEPT command is generated automatically by Code Debug TSO.

Use INTERCEPT in an unattended batch test to get control in a subroutine or fetched procedure and establish qualification for the subroutines or procedures to be invoked. The command also identifies the program to be tested in the BTS environment.

When testing in BTS batch mode, the only commands allowed in the command stream are the INTERCEPT command, the START, MAX, TRANCODE, INITSCR, and POSTSCR parameters, and the XPED command.

General qualification rules for the double colon and single colon cannot be applied.

A record of the command is written to the session log.

Input

image2021-2-16_10-2-46.png

The following are the parameter descriptions for the INTERCEPT command:

program-name (COBOL PL/I, and C language)

The name of the module, subroutine, CSECT, load module, or fetched procedure/function to be tested. A value is required for this field. The value can be any valid program name not exceeding eight characters.

module-name (Assembler only)

The name of the module or the subroutine to be tested. A value is required for this field. The value can be any valid module name not exceeding eight characters.

ENTry (COBOL and Assembler)

An optional alternate entry-point in the module if execution is to begin from some point other than the link-edited entry point. It can also be the entry point for the load module if no entry point is specified in the link-edit.

LOAdm

To test a member of a statically-linked load module, enter the name of the composite load module as the value for load-module.

If the member name and the load module name are the same, a value is not required for this field.

INITscr (COBOL, PL/I, and C language)

The member name of the entry-script. This test script is executed at the before breakpoint in the program specified.

The entry script specified must be a member of a PDS defined on the Test Script Libraries screen of the Setup Menu, or the site-wide script PDS, if defined.

Important

The entry-script will not execute if the INTERCEPT program-name is the same as the program name being tested. Any initial/entry script processing to be done for the program tested must be part of the initial script specified in the test startup.

POSTscr (COBOL, PL/I, and C language)

The member name of the post-script. This test script is executed after the EXIT command has been entered to end the test.

The post script specified must be a member of a PDS defined on the Test Script Libraries screen of the Setup Menu, or the site-wide script PDS, if defined.

STArt (COBOL, PL/I, and C language)

The intercept number where Code Debug TSO testing should begin. This number informs Code Debug TSO when to begin processing. The value for intercept-start can be any valid numeric number not exceeding four digits. The default value is 1. This parameter is valid only if you are testing in the BTS batch environment.

MAX (COBOL, PL/I, and C language)

The number of times the intercept is to remain active. If no maximum intercept-count is specified, the program is intercepted each time it is executed. This parameter is valid only if you are testing in the BTS batch environment.

DB2 (COBOL, PL/I, and C language)

If the program to be tested is a Db2 program, the keyword Db2 must be specified.

TRANCODE (COBOL, PL/I, and C language)

The transaction-code of the module or subroutine to be tested. This parameter is valid only if you are testing in the BTS batch environment.

Usage Notes

ALL Languages

  1. The INTERCEPT command performs the equivalent of a SOURCE module-name command with AFTER and BEFORE module breakpoint commands. (In batch, the source is not displayed.)
  2. The DELETE INTERCEPT command without a specified program name removes all intercepts set for all programs for which INTERCEPT commands were entered. Specify a program-name to remove only the intercepts set in that program.
  3. In batch testing, breakpoint commands encountered after an INTERCEPT command are assumed to refer to the program specified in the last INTERCEPT command processed.
  4. When the INTERCEPT command is used interactively to specify a subprogram, the source for that program is displayed. Any number of commands can be entered once the source is displayed.
  5. The LOCATE * or SOURCE command returns you to the source display where execution was suspended.
  6. SHOW INTERCEPTS displays the active intercepts. See SHOW for details.
  7. When INTERCEPT program-name is specified, the name of the load module defaults to the same name as the specified program. For example, INTERCEPT TRIMAINC is equivalent to INTERCEPT TRIMAINC LOADM TRIMAINC. However, some compilers, particularly for PL/I and C, can generate CSECTs that match the load module name but are not the desired program. In this situation, use the LOADM parameter to specify the desired program. For example, enter INTERCEPT @ST00001 LOADM TRIMAINC if the desired program is @ST00001.

COBOL

PL/I

C Language

  1. When the program to be tested is a BTS or Dialog Box Manager program, the INTERCEPT command is used to specify and set up the program to be tested.

Assembler

  1. Code Debug TSO places a before breakpoint on a line containing the CSECT or START directive and interprets it as the before module breakpoint. Code Debug TSO also places a before breakpoint on a line containing the L R13,4(R13) instruction followed by the BR R14 instruction, on the RETURN macro, PR instruction, or CEETERM macro and interprets it as the after module breakpoint.

Examples

Assembler

  1. To intercept the CSECT TRITSTA and display the breakpoints, enter:
      INTERCEPT TRITSTA; SHOW BREAKS
    The following figure shows the result of executing that INTERCEPT command.
    Intercepting TRITSTA and Showing Breaks 

    -------------------------- CODE DEBUG TSO - SOURCE ---------------------------
    COMMAND ===>                                                   SCROLL ===> CSR
             SPECIFIED STATEMENTS ARE SHOWN - RESTORE SOURCE WITHEND
    ------   -------------------------------------------- Before TRIMAINA/AMODE 24 <>
    ******   ************************** TOP OF MODULE ****************************
    -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - - -    1 LINE NOT DISPLAYED
    000039 B  TRITSTA CSECT
    -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - - -  66 LINES NOT DISPLAYED
    000106 B  ENDIT   L     R13,4(R13)
    -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - - -  24 LINES NOT DISPLAYED
    ******   ************************ BOTTOM OF MODULE *************************** 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*