Previous Topic: Indirect CommandsNext Topic: How to Control the Flow of Execution


Code Indirect Commands

CA InterTest provides an indirect commands facility for coding the statements. You can access it from the source listing or from the ITST menus.

  1. To access the indirect commands facility from the Source Listing Display screen, type icmds in the command line or 11 in the Option # field and press Enter, as shown in the following screen:

    CA InterTest for CICS V9.1 ‑ PROTSYM FILE SOURCE LISTING DISPLAY COMMAND ===> icmds Program= COBDEMO Option # Stmt # Margin= 01 Search= ‑‑‑‑‑‑‑‑‑+‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ 00001 ID DIVISION. 00002 PROGRAM‑ID. COBDEMO. 00003 ENVIRONMENT DIVISION. 00004 DATA DIVISION. _ 00005 WORKING‑STORAGE SECTION. _ 00006 77 S999‑FIELD1 PIC S9(3). _ 00007 77 S999‑FIELD2 PIC S9(3) VALUE +50. _ 00008 77 999‑FIELD1 PIC 9(3). _ 00009 77 999‑FIELD2 PIC 9(3) VALUE 50. . . .

To access the Indirect Commands facility from the menus, access the Program Monitoring menu (fastpath is ITST 2.1), and select the Commands option. Perform the following steps:

  1. Select option 2 Monitoring on the Primary Option Menu. CA InterTest displays the Monitoring Menu.
  2. Select option 1 Programs. CA InterTest displays the Program Monitoring screen.
  3. In the Program field, type the name of the program for which you want to create indirect commands.
  4. Type an s to the left of the Commands option (Indirect commands), as shown in the following screen. Press Enter.

    ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ CA InterTest V9.1 PROGRAM MONITORING ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ COMMAND ===> Type information and S to set or R to remove option(s) below. Program . . cobdemo_ Program name (or .ALL, .OPTIONS or generic) User ID . . ____ User (or .ANY) for whom the program is monitored Option Description More: + _ Status Display and/or remove monitoring options (S only) _ Monitor Monitoring (R removes monitoring and all options previously set) _ UBP Unconditional breakpoints (specific program only) _ CBP Conditional breakpoints (specific program only) _ RBP Breakpoints for CICS, DB2, DL/I or external CALL requests _ Stmt Trace Statement tracing and data monitoring (COBOL only) _ New copy Fetch new copy of program and reset monitoring options (S only) s Commands Indirect commands defined for a specific COBOL or PL/1 program _ Replace CICS resource name replacement options _ Protect Storage protection monitoring options _ Special Other options (storage allocation, file updating, etc.) _ Composite Monitor multi‑CSECT program's separately compiled components PF1 Help 2 3 End 4 Return 5 6 PF7 Backward 8 Forward 9 10 11 12

    Either access method takes you to the Indirect Commands screen shown in the following example.

    This example shows the indirect commands that you use to fix the ASRA condition in our COBDEMO demo program, without recompiling. Setting TASKNUM to 1 alters the demo results.

    Use the clear key to complete the termination of the demo when the "You have completed the sample CA InterTest test session" screen appears.

    CA InterTest MONITOR COMMAND BUILDER - COBDEMO INDIRECT COMMANDS 24 Term ID (or .ANY or .NO): U039 Delete ALL: NO LINE COMMAND ----- ------------------------------------------------------------------------ 00010 /* INITIALIZE TASKNUM */ 00020 MOVE 1 TO TASKNUM 00030 EXIT 1 Help 2 3 End 4 5 6 7 Backward 8 Forward 9 Top 10 Bottom 11 12 CAIN1261 Indirect command(s) added.

To code the indirect commands for your own programs, perform the following steps:

  1. Specify the terminal ID (terminal ID, .ANY or .NO) where the indirect commands will take effect. The default terminal varies according to how you are monitoring the program.
  2. Type the statement numbers and the text of the indirect commands as shown previously on the Indirect Commands screen. For more information, see Indirect Commands in the User Guide and online Help.
  3. After coding the statements, press PF3 to exit the Indirect Commands facility. If you accessed the facility from the ITST menus, use =x to exit the menus.