Information
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.

Setting Breakpoints in a Calling Program (Code Debug CICS PL/I)


  1. Type XPED CWDEMPE on a blank CICS screen. Press Enter to display source code for CWDEMPE on the Source Listing screen (2.L) as shown in the following figure:
     Source Listing Screen (2.L)

     -------------------------------- SOURCE LISTING (2.L) --------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
    MODULE: CWDEMPE  CSECT: CWDEMPE           COMPILED: 09 JUN 2005 - 11:23:48
    ------   --------------------------------------------------------------------->
    000359    ;  CALL DFHTNNA1('   .  ................00000315' /* '02 06 80 00 03
    000360     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 F0 F0 F0 F0 F3 F1
    000361    5 'X */,L800_RETURN_TO_CICS);
    000362       END;
    000363
    000364       /* EXEC CICS ASSIGN
     000365                    SYSID(WS_SYSID)
     000366                    NOHANDLE  */

    000367       DO;
    000368       DCL DFHTNNA2 BASED(ADDR(DFHEI0)) OPTIONS(INTER ASSEMBLER) ENTRY(*,
    000369    ;  CALL DFHTNNA2('   .  ................00000318' /* '02 08 80 00 23
    000370     00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 F0 F0 F0 F0 F0 F3 F1
    000371    8 'X */,WS_SYSID);
    000372       END;
    000373
    000374    /* ---------------------------------------------------------------- *
     000375    L000_FIXED_POINT:;
     000376       DCL FIXED_BIN15A    FIXED BIN(15,7) SIGNED ;
     000377       DCL FIXED_BIN31A    FIXED BIN(31,7) SIGNED ;
     000378       DCL FIXED_BIN63A    FIXED BIN(63,15) SIGNED ;
  2. Type F CWCDSUBA in the COMMAND field. Press Enter to find the call to CWCDSUBA.
  3. Type the B (Before) line command on the statement number for the call, which is statement 1012 in this example, and press Enter. The B flag in the following figure shows that the breakpoint has been set.
     Breakpoint Set on the Source Listing Screen (2.L)

     -------------------------------- SOURCE LISTING (2.L) --------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
    MODULE: CWDEMPE     *********************** BEFORE SET ************************
    ------   --------------------------------------------------------------------->
    001011
    001012 B     CALL  CWCDSUBA(EMP_RECORD_LIST,CWCDWRKA) ;
    001013
    001014       /* SEND SCREEN AND RETURN CONTROL TO CICS...*/
    001015
    001016       EMPNUMB = EMP_NUM_LIST ;
    001017       EMPNAME = 'JOHN SMITH' ;
    001018       HRSWRKD = EMP_HOURS_LIST ;
    001019       HRLYRAT = EMP_RATE_LIST ;
    001020       GROSPAY = EMP_TOTPAY_LIST ;
    001021
    001022       GOTO SEND_PAYMAP2 ;
    001023
    001024    L1000_PROCESS_00333_SELECTION:
    001025
    001026       /*---------------------------------------------------------------*
     001027       /* GETMAIN A 16 BYTE AREA AND MOVE 24 BYTES OF DATA IN IT. THIS  *
     001028       /* SHOULD CAUSE STORAGE VIOLATION AND SHOULD BE TRAPPED BY       *
     001029       /* XPED/CICS IF STORAGE MONITORING IS ON.                        *
     001030       /*---------------------------------------------------------------*
  4. Type =2.6.1 in the COMMAND field and press Enter to display the following figure .
    This screen shows all the CSECTs linked together to form the load module CWDEMPE. The SELECTED field indicates whether source is shown for that CSECT. CICS (DFH) and PL/I (IBM) modules are automatically excluded. The source for CWDEMPE displays automatically — you do not need to select it.
     List of CSECTs Screen (2.6.1)

     -------------------------------- LIST OF CSECTS (2.6.1) ------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
     MODULE: CWDEMPE  CSECT: CWDEMPE           COMPILED: 09 JUN 2005 - 11:23:48

     LINE COMMANDS:  D (Deselect)  S (Select)
     LOADED FROM LIBRARY: XD.TEST.R80.PDSE.LOADLIB
     CMD    CSECT        LISTING    SELECTED      OFFSET      LENGTH     ADDRESS
    ----------------------------------------------------------------------------
           DFHELII                 EXCLUDED     00000000    00000028    389D7C30
            CEESTART                EXCLUDED     00000028    0000007C    389D7C58
      _     CWCDSUBA    CWCDSUBA    YES          000000A8    000000C4    389D7CD8
            IBMPINPL                EXCLUDED     00000170    00000024    389D7DA0
            SETJMP                  EXCLUDED     00000198    0000000A    389D7DC8
            IBMQERNL                EXCLUDED     000001A8    00000014    389D7DD8
            IBMQHCAA                EXCLUDED     000001C0    00000014    389D7DF0
            IBMQHACA                EXCLUDED     000001D8    00000014    389D7E08
            IBMQPAMA                EXCLUDED     000001F0    00000014    389D7E20
            IBMQPAMN                EXCLUDED     00000208    00000014    389D7E38
            IBMQPAFC                EXCLUDED     00000220    00000014    389D7E50
            IBMQPAFB                EXCLUDED     00000238    00000014    389D7E68
            IBMQHODP                EXCLUDED     00000250    00000014    389D7E80
            IBMQHMPD                EXCLUDED     00000268    00000014    389D7E98
            IBMQHMPP                EXCLUDED     00000280    00000014    389D7EB0
            IBMQEFSH                EXCLUDED     00000298    00000014    389D7EC8
  5. Type S next to CWCDSUBA in the CMD field and press Enter.
  6. Type CWCDSUBA in the CSECT field.
  7. Type =2.L in the COMMAND field and press Enter. The following figure is displayed showing source for CWCDSUBA.
     Source Listing Screen (2.L) Showing CWCDSUBA

     --------------------------------- SOURCE LISTING (2.L) -------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
    MODULE: CWDEMPE  CSECT: CWCDSUBA          COMPILED: 17 MAR 2006 - 09.19
    ------   --------------------------------------------------------------------->
    000018             STM   R14,R12,12(R13)       SAVE CALLING PGM'S REGISTERS.
    000019             LR    R12,R15               ESTABLISH ADDRESSABILITY.
    000020             USING CWCDSUBA,R12          REG 12 IS THE BASE REG.
    000021             L     R4,4(,R1)             A(WORK AREA)
    000022             USING CWCDWRK,R4
    000023             XC    0(WRKLEN,R4),0(R4)    CLEAR WORKAREA
    000024             ST    R13,SAVEAREA+4        SAVE CALLERS SAVEAREA ADDRESS
    000025             LA    R15,SAVEAREA          GET ADDRESS OF THIS PGMS SAVEARE
    000026             ST    R15,8(R13)            SAVE IT HERE
    000027             LR    R13,R15               R13 = THIS PGMS SAVEAREA
    000028    *   START PAYROLL PROCESSING.....
    000029             L     R2,0(,R1)             LOAD ADDR OF CALLING PGM LIST.
    000030             MVC   LISTAREA(20),0(R2)    MOVE CALLING PGM LIST TO LISTARE
    000031             MVC   LSTRATE,=C'00000'     ZERO OUT LISTAREA RATE FIELD.
    000032             MVC   LSTTPAY,=C'0000000'   ZERO OUT LISTAREA TOTAL PAY FLD.
    000033             ZAP   PAKTPAY,=P'+0'        ZERO OUT TOTAL PAY PACKED FIELD.
    000034             LA    R6,EMPTBL             LOAD ADDR OF EMPLOYEE TABLE.
    000035    TBLLOOP  CLC   LSTNUM,0(R6)          SEARCH FOR EMP NUM IN TABLE.
    000036             BE    CALCPAY               FOUND IT, CALCULATE PAY.
    000037             LA    R6,8(,R6)             GET NEXT EMP NUM IN TABLE.
  8. Press PF8 to scroll down through the listing.
  9. Type the B (Before) line command on the statement number for the instruction BR R14 (statement 49 in this example) and press Enter. This sets a breakpoint at the branch back to the main program  as shown in the following figure.

    You have set a breakpoint in the main program at the call to the subroutine and a breakpoint in the subroutine just before the return to the main program. The programs are ready to test.

 Breakpoint Set on the Source Listing Screen (2.L)

 --------------------------------- SOURCE LISTING (2.L) -------------------C024
COMMAND ===>                                                   SCROLL ===> CSR
MODULE: CWDEMPE     *********************** BEFORE SET ************************
------   --------------------------------------------------------------------->
000038             C     R6,=A(EMPTBL+32)      ARE WE AT THE LAST EMP IN TABLE?
000039             BNE   TBLLOOP               NO, REPEAT TABLE LOOP.
000040    CALCPAY  MVC   LSTRATE(3),5(R6)      MOVE RATE TO LISTAREA.
000041             PACK  PAKTPAY(5),LSTRATE    MOVE RATE TO A PACKED FIELD.
000042             PACK  PAKHOURS(2),LSTHOURS  MOVE HOURS TO A PACKED FIELD.
000043             MP    PAKTPAY,PAKHOURS      MULTIPLY RATE * HOURS.
000044             UNPK  LSTTPAY,PAKTPAY       MOVE TOTAL PAY TO LISTAREA.
000045             OI    LSTTPAY+6,X'F0'       STRIP OFF SIGNED BYTE.
000046             MVC   0(20,R2),LISTAREA     PASS DATA BACK TO CALLING PGM.
000047             L     R13,SAVEAREA+4        LOAD ADDRESS OF PREVIOUS STACK.
000048             LM    R14,R12,12(R13)       RESTORE REGISTERS.
000049 B           BR    R14                   GO BACK TO CALLING PROGRAM.
000050             LTORG
000051                   =A(EMPTBL+32)
000052                   =C'00000'
000053                   =C'0000000'
000054                   =P'+0'
000055    *
------
------     Active Usings: CWCDWRK,R4  CWCDSUBA,R12

 

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

BMC AMI DevX Code Debug for CICS 17.02