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.

Overview of Code Debug TSO commands


Code Debug TSO commands are used to interactively test and debug your programs and to perform other functions associated with your test session.

Some Code Debug TSO commands are primary commands you must enter on the command line. Many primary commands also have a corresponding line command that you can enter in the designated line command area on a screen.

In this space, primary commands are combined with their corresponding line commands and discussed together. There are, however, several line commands without corresponding primary commands. All commands are listed alphabetically.

Command Categories

Debugging commands can be categorized as follows (some commands fit within more than one category):


Breakpoint Commands

AFTER, A

IF

SKIP, S

AT

INSERT, I

TRACE, T

BEFORE, B

INTERCEPT

WHEN

COUNT, C

ONETIME, O


GO, GO n

PAUSE


Program Data Commands

ACCEPT

KEEPE, KE, E

PEEKE, PE, E

DLEFT

KEEPH, KH, H

PEEKH, PH, H

DRIGHT

MEMORY

T (Template)

FADB2 EXPLAIN, XP

MOVE

WS

KEEP, K, K*

PEEK, P, P*


Screen Manipulation Commands

BOTTOM

F (First)

NOLINES

DOWN

FIND

RESET

DLEFT

L (Last)

RIGHT

DRIGHT

LEFT

SOURCE

END

LINE

TOP

EXCLUDE, X

LOCATE

UP

Utility Commands

AA SNAP

GETMAIN

SHOW

ALLOCATE

GPREGS

TSO

BROWSE

HELP

USING

DLI

INCLUDE

VERIFY, V

DROP

LOAD

WHEREIS

FADB2

LOG


GEN, G

MEMORY, M


Test Session Control Commands

CCHILITE

INTERCEPT

SET

COVER

MONITOR

SOURCE

DELETE, D

PSEUDOSOURCE

TEST

EXIT

RESUME

TOGGLE

GO, GO n

RETEST

USE

GOBACK

RETURN

XPED

GOTO, GT

REVERSE


Batch Connect Processing Commands

CONNECT

RUN

STATUS

Command Processing

In interactive mode, the results of command execution are immediately visible on the source display.

Enter Code Debug TSO commands in the following ways:

  • In the primary command area.
  • In the line command area.
  • By pressing the PF key that was assigned to the desired command. Use the SHOW PFKEYS command for a list of the PF key assignments.

Entering Primary Commands

Enter the command in the primary command area and press Enter. Command stacking is allowed where commands are delimited by a semicolon (;), the default. Code Debug allows command stacking using the ISPF command delimiter, the default for which is a semicolon (;).

The primary command area can be extended up to three lines by using the SET CMDSIZE command. The previous primary command can be recalled by entering a question mark (?).

By default, commands entered in lowercase are converted to uppercase. To override the default, use the SET CAPS OFF command. Also, to display lowercase data, use the SET LOWCASE ASIS command.

Entering Line Commands

Code Debug TSO line commands are entered by typing over the compiler-generated statement numbers or the PL/I continuation lines that are denoted by dashes (------). You can type more than one line command before you press Enter.

You can also type more than one breakpoint line command on a single line. Combinations can include the A (AFTER), B (BEFORE), C (COUNT), O (ONETIME), and T (TRACE) commands. For example, you can enter BCA to set before, count, and after breakpoints on a single line, or TAC to set trace, after, and count breakpoints on that line.

Combine the D (DELETE) line command with a qualifying operand to reset a specific function or delete an existing breakpoint. For example, enter DK to delete a keep display, DA to delete an after breakpoint, or DAB to delete both after and before breakpoints.

If you enter the S (SKIP) line command on the same line with other line commands, only the S command is processed. The other commands are ignored.

If you enter some other invalid combination of line commands, Code Debug TSO will issue an error message.

Code Debug TSO records the line command in the session log in the same manner as the primary command. The line command area is interpreted as follows:

  • Code Debug TSO scans the line command area from left to right looking for the first character that differs from the original line number. If it finds one, it then scans from the right (if there are characters that have not been scanned), looking for the rightmost character that is not a blank and different from the original line number. Next, the modified characters in between are examined for validity.
  • The line command must precede any operands.
  • The command is parsed until another (different) line command or a blank is encountered.
  • Any number following a line command is interpreted as an operand.

Be careful when using operands with line commands. Some numbers entered in the line command area may be ignored. Only typed over characters that are different from the original prefix are interpreted as part of the line command. To avoid ambiguity, follow the line command operand with a blank.

If a line command is entered incorrectly, the cursor is positioned on the line containing the error, and the following message is displayed:

    COMMAND NOT RECOGNIZED

The error must be resolved before execution can resume.

If the block form of a line command is used and the paired block is not specified before pressing Enter, the following message is displayed:

    BLOCK COMMAND INCOMPLETEThe command is considered to be pending. This means Code Debug has detected a line command but not yet processed it. For example, if the block line command CC is entered on just one line, it will be pending until the matching CC command is entered on another line. A line command could also be pending if some other line command entered at the same time has caused an error that must be resolved before continuing.

The DELETE primary command cancels any pending line commands.

Command Qualification Rules

Code Debug TSO command qualification is slightly different for each language. The following are the rules for each language, beginning with PL/I.

PL/I

Module (External Procedure) Qualification for PL/I

Code Debug TSO’s breakpoint, program data, and screen manipulation commands will operate in the qualified external procedure unless they are explicitly qualified to another external procedure. For example, if TRIMAINP is the qualified external procedure and you enter:

   BEFORE 24a before breakpoint is set at statement 24 in TRIMAINP.

To use Code Debug TSO commands in an external procedure that is not the qualified external procedure when the procedure name is not contained in the qualified external procedure, you must use a single colon (:) to explicitly qualify the procedure name. For example, if the qualified external procedure is TRIMAINP, and you want to set a before breakpoint at statement 15 in the external procedure TRITSTP, the following must be entered:

   BEFORE TRITSTP:15

Tip

See Overview of Code Debug TSO commands#Load Module Qualification for information about qualifying procedure names that are not unique.

You can make an external procedure the qualified procedure using the SOURCE command. For example, if the qualified external procedure is TRIMAINP and you enter:

    SOURCE TRITSTP

TRITSTP becomes the qualified external procedure. You can then set breakpoints and perform debugging functions in TRITSTP without qualification. Alternatively, you can enter:

    SOURCE TRITSTP;BEFORE 15;KEEP TST_RECto make TRITSTP the qualified external procedure with a before breakpoint set at statement 15, and add to the Keep window the variable TST_REC in TRITSTP.

The SOURCE command allows you to see to an external procedure by the CSECT name, external procedure name, or entry point name if the program is already loaded. You can also see to an external procedure by the name of the load module.

Load Module Qualification

To perform debugging functions in an external procedure that has a duplicate copy link edited into a different load module, or a statically linked version and a dynamically linked version of the same external procedure, you must use load module qualification. Load module qualification consists of using double colons (::).

For example, to set a before module breakpoint in the external procedure TRIRPTP in load module MAINPGM, use a combination of load module qualification (::) and module (external procedure) qualification (:) as shown as follows:

      BEFORE MAINPGM::TRIRPTP:Load module qualification must also be used when a nonqualified external procedure name is identical to a nested procedure name in the qualified external procedure.

Data Qualification

The following are examples of qualifying variable names when entering Code Debug TSO commands. For example, entering:

    KEEP TOTAL_COUNTsets a keep at the variable TOTAL_COUNT in the qualified external procedure. If duplicate variable names exist in the external procedure, including the nested procedures, Code Debug TSO displays a message and you will need to qualify the variable name using data qualification syntax. The following are data qualification examples:

Structure Qualification Example

Entering:

KEEP CUST_REC.TOTAL_COUNT

sets a keep at the structure member TOTAL_COUNT of CUST_REC.

Important

Procedure qualification may be necessary if there is a duplicate data name in a nested procedure.

Entering:

   KEEP TRIPROC:CUST_REC.TOTAL_COUNTsets a keep at the structure member TOTAL_COUNT of CUST_REC in procedure TRIPROC.

Pointer Qualification Example

Entering:

   KEEP PCB_PTR->IO_AREAsets a keep at the variable IO_AREA based on the pointer PCB_PTR.

Procedure Qualification Example

Entering:

   KEEP EDIT_DATA:CUST_RECsets a keep at CUST_REC declared in procedure EDIT_DATA.

Nested Procedure Qualification Example

Entering:

   KEEP PROCESS_INPUT:EDIT_DATA:CUST_RECsets a keep at the variable CUST_REC declared in procedure EDIT_DATA that is contained within procedure PROCESS_INPUT.

The following entries are the rules for COBOL:

COBOL

Module (External Program) Qualification for COBOL

Code Debug TSO’s breakpoint, program data, and screen manipulation commands will operate in the qualified program unless they are explicitly qualified to another separately compiled program. For example, if TRIMAIN is the qualified program and you enter:

   BEFORE 24a before breakpoint is set at statement 24 in TRIMAIN.

To use Code Debug TSO commands in a separately compiled program that is not the qualified program, you must use a single colon (:) to explicitly qualify the program name. For example, if the qualified program is TRIMAIN and you want to set a before breakpoint at statement 15 in the separately compiled program TRITST, the following must be entered:

   BEFORE TRITST:15

Tip

See following Load Module Qualification for information about qualifying program names that are not unique.

You can make a separately compiled program the qualified program using the SOURCE command. For example, if the qualified program is TRIMAIN and you enter:

   SOURCE TRITSTTRITST becomes the qualified program. You can then set breakpoints and perform debugging functions in TRITST without qualification. Alternatively, you can enter:

   SOURCE TRITST;BEFORE 15;KEEP TST-RECto make TRITST the qualified program with a before breakpoint set at statement 15 and add to the Keep window the variable TST-REC in TRITST.

The SOURCE command allows you to see to a separately compiled program by the CSECT name or entry name if the program is already loaded. Otherwise, you must see to a separately compiled program by the name of the load module.

Load Module Qualification

If a separately compiled program in your application is link-edited into multiple load modules, you need to use load module qualification to see to a specific instance of the program. Load module qualification consists of using double colons (::).

For example, to set a before module breakpoint in the separately compiled program TRIRPT in load module MAINPGM, use a combination of load module qualification (::) and module (program) qualification (:), as shown as follows:

   BEFORE MAINPGM::TRIRPT:Also use load module qualification to see to a separately compiled program whose name is identical to a nested program name in the qualified program.

Data Qualification

The following are examples of qualifying data when entering Code Debug TSO commands. For example, entering:

   KEEP SIDE-Asets a keep on the data item SIDE-A in the qualified program. If duplicate variable names exist in the program, Code Debug TSO displays a message, and you will need to qualify the variable name using data qualification syntax. For example, entering:

   KEEP SIDE-A OF WORK-RECsets a keep on SIDE-A of WORK-REC.

Nested program qualification may be necessary if there is a duplicate data name across nested programs. For example, entering:

   KEEP TRIPROG:SIDE-A OF WORK-RECsets a keep on SIDE-A of WORK-REC in nested program TRIPROG.

Nested program qualification can be repeated as many times as necessary to provide a unique reference. For example, entering:

   KEEP PROCESS-INPUT:EDIT-DATA:WORK-RECsets a keep at the variable WORK-REC in the program EDIT-DATA that is contained within the program PROCESS-INPUT.

The following entries are the rules for Assembler, beginning with Module Qualification:

Assembler

Module Qualification for Assembler

Code Debug TSO’s breakpoint, program data, and screen manipulation commands will operate on the qualified module unless they are explicitly qualified to another module. For example, if TRIMAINA is the qualified module and you enter:

   BEFORE +21C+Ea before breakpoint is set to stop before offset +21C+E in TRIMAINA.

To use Code Debug TSO commands in a module that is not the qualified module, you must use a single colon (:) to explicitly qualify the module name. For example, if the qualified module is TRIMAINA and you want to set a before breakpoint to stop before label ZEROIT in module TRITSTA, you would enter the following:

   BEFORE TRITSTA:ZEROITYou can make a module the qualified module using the SOURCE command. For example, if the qualified module is TRIMAINA and you enter:

   SOURCE TRITSTATRITSTA becomes the qualified module. You can then set breakpoints and perform debugging functions in TRITSTA without qualification.

Alternatively, you can enter:

   SOURCE TRITSTA;BEFORE ADDIT;KEEP TSTRECTRITSTA becomes the qualified module with a before breakpoint set at the label ADDIT and the data label TSTREC added to the Keep window.

The SOURCE command allows you to see to a module by the CSECT name or entry name if the module is already loaded. You can also see to a module by the name of the load module if the module is the link-edited entry point in the load module.

Load Module Qualification

To perform debugging functions in a program/module that has a duplicate copy link edited into a different load module, or a statically linked version and a dynamically linked version of the same program/module, you must use load module qualification. Load module qualification consists of using double colons (::).

For example, to set a before module breakpoint in the TRIRPTA in load module MAINPGM, use a combination of load module qualification (::) and module qualification (:) as shown as follows:

   BEFORE MAINPGM::TRIRPTA:

Label Qualification

High Level Assembler uses the period (.) notation to see to a uniquely qualified DSECT label based on different registers. For example, CUSTOMER.LASTNAME refers to a field, EMPLOYEE.LASTNAME refers to another field, and both fields use the same DSECT.

The following entries are the rules for C Language, beginning with Module (External Program) Qualification.

C Language

Module (External Program) Qualification for C Language

Code Debug TSO’s breakpoint, program data, and screen manipulation commands will operate in the qualified external program unless they are explicitly qualified to another separately compiled program. For example, if TRIMAINC is the qualified external program and you enter:

   BEFORE 24a before breakpoint is set at line 24 in TRIMAINC.

To use Code Debug TSO commands in a separately compiled program that is not the qualified external program, and that program’s name is not contained in the qualified external program, you must use a single colon (:) to explicitly qualify the program name. For example, if the qualified external program is TRIMAINC and you want to set a before breakpoint at line 15 in the separately compiled program TRITSTC, you would enter the following:

   BEFORE TRITSTC:15

Tip

See to following Load Module Qualification for information about qualifying program names that are not unique.

You can make a separately compiled program the qualified program using the SOURCE command. For example, if the qualified program is TRIMAINC and you enter:

   SOURCE TRITSTCTRITSTC becomes the qualified program. You can then set breakpoints and perform debugging functions in TRITSTC without qualification. Alternatively, you can enter:

   SOURCE TRITSTC;BEFORE 15;KEEP tst_recto make TRITSTC the qualified program with a before breakpoint set at line 15 and add to the Keep window the variable tst_rec in TRITSTC.

The SOURCE command allows you to see to a separately compiled program by the CSECT name or entry name if the program is already loaded. Otherwise, you must see to a separately compiled program by the name of the load module.

Load Module Qualification

To perform debugging functions in an external function that has a duplicate copy link edited into a different load module, or a statically linked version and a dynamically linked version of the same external function, you must use load module qualification. Load module qualification consists of using double colons (::).

For example, to set a before module breakpoint in the external function TRIRPTC in load module MAINPGM, use a combination of load module qualification (::) and module (external function) qualification (:) as shown as follows:

   BEFORE MAINPGM::TRIRPTC:Load module qualification must also be used when a non-qualified external function name is identical to a function name in the qualified program.

Data Qualification

The following are examples of qualifying variable names when entering Code Debug TSO commands. For example, entering:

   KEEP TOTAL_COUNTsets a keep at the variable TOTAL_COUNT in the qualified program. If duplicate variable names exist in the external program, Code Debug TSO displays a message and you will need to qualify the variable name using data qualification syntax.

The following are data qualification examples.

Structure Qualification Example

Entering:

KEEP CUST_REC.TOTAL_COUNTsets a keep at the structure member TOTAL_COUNT of structure CUST_REC.

Important

Function qualification may be necessary if there is a duplicate data name in another function.

Entering:

   KEEP TRIFUNC:CUST_REC.TOTAL_COUNTsets a keep at the structure member TOTAL_COUNT of structure CUST_REC in function TRIFUNC.

Pointer Qualification Example

Entering:

   KEEP PCB_PTR->IO_AREAsets a keep at the variable IO_AREA based on the pointer PCB_PTR.

Function Qualification Example

Entering:

   KEEP EDIT_DATA:CUST_RECsets a keep at CUST_REC declared in function EDIT_DATA.

 

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