Peter, I'll start by saying I've never used this option.  It does sound
interesting.  From what I have read would you not also need the "WITH
DEBUGGING MODE" setup in the called program.


Paul

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Farley, Peter
Sent: Sunday, December 31, 2023 5:50 PM
To: [email protected]
Subject: Re: Questions about COBOL debugging lines in subroutines

P.S. - COBOL compiler is Enterprise COBOL V6.4.

From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Farley, Peter
Sent: Sunday, December 31, 2023 6:46 PM
To: [email protected]
Subject: Questions about COBOL debugging lines in subroutines


I have a little mystery concerning debugging lines ("D" in column 7) in
COBOL subroutines compiled in the same input file as the main program.
Sample output and code are pasted below.

The execution JCL for this sample program includes a CEEOPTS DD with the LE
"DEBUG" option set so debugging lines SHOULD display on SYSOUT.  In my
little test, only the debugging line in the main program displays on SYSOUT.

Q1: Can anyone tell me why the debugging line in the subroutine does not
execute at run time?

Q2: Is there any way I can adjust the code or the compile process to cause
the subroutine debugging line to execute at run time?

Peter

Sample SYSOUT output:

DBGSAMPL I=+000000003,J=+000000004,K=+000000002

Sample COBOL code compiled as a single SYSIN file to the compiler, using
options 'AR(EX),DS(S),NOSEQ':

       IDENTIFICATION DIVISION.
       PROGRAM-ID. DBGSAMPL.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.
           Z-SYSTEM
               WITH DEBUGGING MODE
           .
       DATA DIVISION.
       LOCAL-STORAGE SECTION.
       01  I    PIC S9(9) BINARY VALUE 1.
       01  J    PIC S9(9) BINARY VALUE 2.
       01  K    PIC S9(9) BINARY VALUE 3.
       PROCEDURE DIVISION.
       MAIN-PARAGRAPH.
           CALL "SUBSAMP1" USING I, J, K
      D    DISPLAY "DBGSAMPL I=" I ",J=" J ",K=" K
           GOBACK
           .
       END PROGRAM DBGSAMPL.

       IDENTIFICATION DIVISION.
       PROGRAM-ID. SUBSAMP1.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       LINKAGE SECTION.
       01  I1   PIC S9(9) BINARY VALUE 1.
       01  J1   PIC S9(9) BINARY VALUE 2.
       01  K1   PIC S9(9) BINARY VALUE 3.
       PROCEDURE DIVISION USING I1, J1, K1.
       MAIN-PARAGRAPH.
           MOVE K1 TO I1
           MOVE J1 TO K1
           MOVE 4  TO J1
      D    DISPLAY "SUBSAMP1 I=" I1 ",J=" J1 ",K=" K1
           GOBACK
           .
       END PROGRAM SUBSAMP1.
--
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by e-mail
and delete the message and any attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to