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

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

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

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

Reply via email to