And that should have been "CEEOPTS" (plural) and not just "CEEOPT". Brain f*rt, apologies.
When I run your code from a V4.2 compile and supplying the LE DEBUG option, I get as output: TRACE FOR PROCEDURE-NAME : SOME-ROUTINE 000000001 TRACE FOR PROCEDURE-NAME : SOME-ROUTINE 000000004 TRACE FOR PROCEDURE-NAME : SOME-ROUTINE 000000007 TRACE FOR PROCEDURE-NAME : SOME-ROUTINE 000000010 END OF DEBUG PROGRAM HTH Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Farley, Peter x23353 Sent: Thursday, April 06, 2017 7:03 PM To: [email protected] Subject: Re: COBOL Declaratives Use for Debugging On I haven't got full use of our Ent. COBOL V5.2 compiler yet (SDLC procedures are still being upgraded to support it), but I have done identical debugging code in Ent. COBOL V4.2 using "ALL PROCEDURES" instead of "Some-Routine" and it worked like a charm. Almost the equivalent of the old READY TRACE facility. Did you enable LE debugging in the PARM? IIRC, debugging doesn't execute unless you do: //STEP1 EXEC PGM=COBOLDM,PARM='pgm parm values/DEBUG' Or equivalently, //STEP1 EXEC PGM=COBOLDM,PARM='pgm parm values' //CEEOPT DD * DEBUG //* Or using the IGYWCLG PROC: //GO.CEEOPT DD * DEBUG //* HTH Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Richard Zierdt Sent: Thursday, April 06, 2017 6:36 PM To: [email protected] Subject: COBOL Declaratives Use for Debugging On Enterprise COBOL supposedly supports a paragraph-tracing capability, by using the SOURCE-COMPUTER . . . WITH DEBUGGING MODE statement along with Declaratives section / USE FOR DEBUGGING in the Procedure Division. The COBOL-provided system variable Debug-Name is supposed to provide the name of the paragraph the program is running in, essentially providing a trace of the paragraphs that were executed. What I coded is based on the COBOL Programming Guide, Ver 5.1, SC14-7382-00, page 383, and while the program runs, it does not produce any expected DISPLAY statements, as coded under DEBUG-DECLARATIVES-PARAGRAPH. Code is below. It's short. Perhaps the problem is one of incompatible COBOL compile options. I tried TEST and NOTEST. OPTIMIZE(0) is set. Or perhaps a missing, but required, DD statement is needed (except then I would have expected "DD STATEMENT MISSING.") Or perhaps there's a COBOL installation parameter that disables this functionality, but I could not find one, if one exists. If someone has a working example of this, showing the COBOL syntax and compile options used, I'd appreciate it. Otherwise, it will remain as one of those COBOL Unsolved Mysteries. Best - Richard Zierdt // EXEC IGYWCLG IDENTIFICATION DIVISION. PROGRAM-ID. COBOLDM. AUTHOR. Testing COBOL's WITH DEBUGGING MODE capability. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-370 WITH DEBUGGING MODE. DATA DIVISION. WORKING-STORAGE SECTION. 01 W Pic 9(9) Value Zero. 01 Total Pic 9(9) Value 1. 01 Trace-Message Pic X(30) Value " Trace for Procedure-Name : ". PROCEDURE DIVISION. DECLARATIVES. DEBUG-DECLARATIVES SECTION. USE FOR DEBUGGING ON Some-Routine. DEBUG-DECLARATIVES-PARAGRAPH. DISPLAY TRACE-MESSAGE, DEBUG-NAME, TOTAL. END DECLARATIVES. Main-Program Section. Perform Paragraph-A Perform Some-Routine Perform Some-Routine Perform Some-Routine Perform Some-Routine Perform Paragraph-C Display 'End of Debug program' Stop Run. Paragraph-A. add 1 to W. Some-Routine. add 3 to Total. Paragraph-C. Perform Paragraph-D add 5 to W. Paragraph-D. add 7 to W. //GO.SYSOUT DD SYSOUT=* DISPLAY commands //MSGFILE DD SYSOUT=* Language Environment (didn't help) -- 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
