John, Thanks for clearing my mind on this. You're right, it really is not something I should do, since as you say the code with "D"ebugging marks in column 7 is either there or not there after the compile is done. I think I was trying to provide for dynamically (perhaps via PARM) controlled "D"ebugging code, but after I thought about it again I realized that solution is just as easily done with regular non-"D"ebugging lines controlled by a switch in WOORKING-STORAGE, and forget about using WITH DEBUGGING entirely.
Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of McKown, John Sent: Monday, June 04, 2012 1:22 PM To: [email protected] Subject: Re: Is there an Enterprise COBOL API to detect SOURCE-COMPUTER "WITH DEBUGGING" on or off at runtime? I don't know of a way to detect that via an API call. I am curious as to why you want to. Seems inefficient to me. The compiler knows at compile time if WITH DEBUGGING is ON or OFF. So why use up CPU cycles determining something that is already determined at compile time. Whatever you are going to do in the source if it is ON, just use the D indicator to determine it at compile time and "hard code" it then. I don't do much COBOL, but in HLASM I do something similar with the SYSPARM("DEBUG"). And I always just test that at assembly time with an AIF. -- John McKown Systems Engineer IV IT <Snipepd) > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Farley, Peter x23353 > Sent: Monday, June 04, 2012 12:12 PM > To: [email protected] > Subject: Is there an Enterprise COBOL API to detect > SOURCE-COMPUTER "WITH DEBUGGING" on or off at runtime? > > The subject is the question. Obviously I can insert a > WORKING-STORAGE switch that is off by default and a > "D"ebugging line in the PROCEDURE division to turn "on" that > switch when "WITH DEBUGGING" is in effect, but this seems > clumsy to me. > > If there is another way, I'd appreciate any info you can provide. > > Peter -- 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

