Peter's original question was "The subject is the question. Obviously I can insert a WORKING-STORAGE switch that is off by default and a "Debugging 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" But it turns out that what he is really after is doing some procedure code when in debugging mode but not at all times. I think the problem is that you are used to "debugging lines" but don't know about (or have forgotten about) Debugging Declaratives These are what you really want. See (for example) http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/igy3lr50/8.1.15.4 There is a "nice" example of how to use it in the COBOL Migration guide where it shows how to replace the OS/VS COBOL "READY TRACE" statement with a DEBUGGING DECLARATIVE. See: http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/igy3mg50/4.1.5 and look at the sample code under READY TRACE ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN