CEETEST—Invoke Debug Tool

CEETEST invokes a debug service such as Debug Tool, which is supplied with z/OS.

Debug Tool supports debugging of Language Environment, except for some noted restrictions. For more information about Debug Tool for z/OS®, see Debug Tool Utilities and Advanced Functions. If you want to invoke another interactive debug service, refer to the appropriate user's guide.
Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEETEST--(--+-----------------------+--,--fc--)-------------><
               '-string_of_commands--,-'             

string_of_commands (input)
A halfword-prefixed string containing a debug tool command list. string_of_commands is optional. If a debug tool is available, the commands in the list are passed to the debug tool and carried out. If this parameter is omitted, your debug service defines the action taken. For more information, refer to the appropriate user's guide for your debug service.
fc (output)
A 12-byte feedback code, optional in some languages, that indicates the result of this service. If you choose to omit this parameter, refer to Invoking callable services for the appropriate syntax to indicate that the feedback code was omitted.

The following symbolic conditions can result from this service:

Code Severity Message number Message text
CEE000 0 The service completed successfully.
CEE2F2 3 2530 A debug tool was not available.
CEE2F7 3 2535 Profiler loaded; a debug tool was not available.

Usage notes

  • z/OS UNIX considerations—CEETEST applies to the enclave. All threads in the enclave can access debugger information.

For more information

Examples

  1. Following is an example of CEETEST called by C/C++.
    /*Module/File Name: EDCTEST   */
    
    #include <string.h>
    #include <stdio.h>
    #include <leawi.h>
    #include <stdlib.h>
    #include <ceeedcct.h>
    
    int main (void) {
    
       int x,y,z;
       _VSTRING commands;
       _FEEDBACK fc;
    
       strcpy(commands.string,
                "AT LINE 30 { LIST(x); LIST(y); GO; }");
       commands.length = strlen(commands.string);
    
       CEETEST(&commands,&fc);
    
       if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
          printf("CEETEST failed with message number %d\n",
                  fc.tok_msgno);
          exit(2999);
       }
       x = y = 12;
      /* .
         .
         . */
       /* debug tool displays the values of x and y */
       /* at statement 30 */
      /* .
         .
         . */
    }
  2. Following is an example of CEETEST called by COBOL.
    CBL LIB,QUOTE
          *Module/File Name: IGZTTEST
           IDENTIFICATION DIVISION.
           PROGRAM-ID. IBCT002.
    
           DATA DIVISION.
           WORKING-STORAGE SECTION.
           01  MANVAR1                 PIC S9(9) BINARY.
           01  CEETEST-PARMS.
               02  Vstring-length      PIC S9(4) BINARY.
               02  Vstring-text.
                   03  Vstring-char    PIC X,
                               OCCURS 0 TO 256 TIMES
                               DEPENDING ON Vstring-length
                                  of CEETEST-PARMS.
               01 FC.
               02  Condition-Token-Value.
               COPY  CEEIGZCT.
                   03  Case-1-Condition-ID.
                       04  Severity    PIC S9(4) BINARY.
                       04  Msg-No      PIC S9(4) BINARY.
                   03  Case-2-Condition-ID
                             REDEFINES Case-1-Condition-ID.
                       04  Class-Code  PIC S9(4) BINARY.
                       04  Cause-Code  PIC S9(4) BINARY.
                   03  Case-Sev-Ctl    PIC X.
                   03  Facility-ID     PIC XXX.
               02  I-S-Info            PIC S9(9) BINARY.
           PROCEDURE DIVISION.
           PARA-IBCT002.
               MOVE 0 TO MANVAR1
               COMPUTE MANVAR1 = MANVAR1 + 100
               DISPLAY "The value of MANVAR1 is " , MANVAR1
          ***************************************************
          *  CALL CEETEST FOR FIRST  TIME.                  *
          ***************************************************
               MOVE 70 TO Vstring-length of CEETEST-PARMS.
               MOVE "DESC PROGRAM AT ENTRY IBCT002:>SUBRTN"
                 TO Vstring-text of CEETEST-PARMS(1:37).
               move " PERFORM Q LOC GO END-PERFORM GO "
                 TO Vstring-text of CEETEST-PARMS(38:33).
               CALL "CEETEST" USING CEETEST-PARMS, FC.
               IF NOT CEE000 of FC  THEN
                   DISPLAY "CEETEST(1st call) failed with msg "
                       Msg-No of FC UPON CONSOLE
                   STOP RUN
               END-IF.
          ***************************************************
          *  CALL CEETEST A SECOND TIME.                    *
          ***************************************************
               MOVE 4 TO Vstring-length of CEETEST-PARMS.
               MOVE "QUIT "
                 TO Vstring-text of CEETEST-PARMS.
               CALL "CEETEST" USING CEETEST-PARMS, FC.
               IF NOT CEE000 of FC  THEN
                   DISPLAY "CEETEST(2nd call) failed with msg "
                       Msg-No of FC UPON CONSOLE
                   STOP RUN
               END-IF.
          **************************************************
               GOBACK.
          **************************************************
           IDENTIFICATION DIVISION.
           PROGRAM-ID. SUBRTN.
           DATA DIVISION.
           WORKING-STORAGE SECTION.
           01  MANVAR1                 PIC S9(9) BINARY.
           01  MVAR                    PIC S9(9) BINARY.
          PROCEDURE DIVISION.
           PARA-SUBRTN.
               COMPUTE MVAR = MVAR + 100 .
               COMPUTE MANVAR1 = MANVAR1 + 100 .
    
               GOBACK.
           END PROGRAM SUBRTN.
           END PROGRAM IBCT002.
  3. Following is an example of CEETEST called by PL/I.
    *PROCESS MACRO;
     /* Module/File Name: IBMTEST                        */
     /****************************************************/
     /**                                                **/
     /** Function: CEETEST - Invoke a Debug Tool        **/
     /**                                                **/
     /****************************************************/
     PLITEST: PROC OPTIONS(MAIN);
    
        %INCLUDE  CEEIBMAW;
        %INCLUDE  CEEIBMCT;
    
        DCL DBGCMD  CHAR(255) VARYING;
        DCL 01 FC,                     /* Feedback token */
               03 MsgSev    REAL FIXED BINARY(15,0),
               03 MsgNo     REAL FIXED BINARY(15,0),
               03 Flags,
                  05 Case      BIT(2),
                  05 Severity  BIT(3),
                  05 Control   BIT(3),
               03 FacID     CHAR(3),      /* Facility ID */
               03 ISI   /* Instance-Specific Information */
                            REAL FIXED BINARY(31,0);
    
        DBGCMD = 'QUERY PROGRAMMING LANGUAGE';
    
        CALL CEETEST ( DBGCMD, FC );
        IF  FBCHECK( FC, CEE000)  THEN  DO;
           PUT SKIP LIST('Debug tool called with command: '
              || DBGCMD );
           END;
        ELSE  DO;
           DISPLAY('CEETEST failed with msg ' || FC.MsgNo);
           STOP;
           END;
    
     END PLITEST;