Try this
*** COBOL 6.2 OPTIMIZATION PARMAMETERS 
***------------------------------------
 OPTIMIZE(0)                           
 TEST(NOEJPD,DWARF,SOURCE,NOSEPARATE)  

Thanks
Shelia 

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Farley, Peter x23353
Sent: Thursday, October 6, 2022 6:43 PM
To: [email protected]
Subject: Re: COBOL V3.2 to COBOL V6.3 conversion effort and Any z/OS or LE 
limits

Michael,

I have to disagree with your blanket statement about never trying to debug 
optimized code.  While it is sometimes true that debugging optimized code 
presents a problem, this is NOT always the case.  Certainly recompiling with 
OPT(0) makes debugging easier, but it can hide subtle bugs if you do that.  The 
TEST(SOURCE) compiler option is very helpful for debugging optimized code.  At 
least in my experience, TEST(SOURCE) makes the Intertest debugger behave a lot 
better.  TEST(SOURCE) seems to force the compiler to use "a little less 
optimization" regarding intermediate results, and for example to actually 
populate the target of a MOVE at the time of (or very near the time of) that 
MOVE statement.  Without TEST(SOURCE) you may well see only garbage or a prior 
value in that target variable even after the MOVE has supposedly been executed, 
because for optimization purposes the compiler is keeping the actual value in a 
generated temp field invisible to any debugger.

In other words, TEST(SOURCE) reduces a little bit of optimization in return for 
making debugging optimized code much more effective and possible.  This can be 
a critical advantage when shooting a production issue at oh-dark-thirty with 
Operations and other management breathing down your neck for a resolution NOW 
before their critical (to them) SLA is missed.

It is only when the compiler tells you (in the messages at the end of the 
listing) that it "copied procedures" to multiple locations where it is 
performed that one always has a problem, because any interactive breakpoint set 
in the "copied" paragraphs will never stop there.  In that case it is 
unfortunately true that one must recompile with OPT(0) to see what is actually 
happening in those "copied" paragraphs.

Otherwise (again, in my experience), optimized code can be debugged fairly 
easily if TEST(SOURCE) is used.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Michael Schmitt
Sent: Thursday, October 6, 2022 6:25 PM
To: [email protected]
Subject: Re: COBOL V3.2 to COBOL V6.3 conversion effort and Any z/OS or LE 
limits

IBM COBOL for z/OS V5 and later can not live in a PDS library. You must link to 
a PDS/E Program Object library. This may have consequences.
 
If you are using IGZERRE to establish a resusable run-time environment, you 
must convert to CEEPIPI.

If you are using ORDER statements in the Binder, they will not behave as 
expected when the module contains a mixture of COBOL 6 and assembler or COBOL 3 
modules.

If you are solving dumps without aid of an abend diagnosis product, you will be 
severely challenged. It is much harder to find your program's working storage 
in a dump.

Do not attempt to debug optimized COBOL 6 code. The compiler drastically 
rearranges the code path. When debugging, compile as OPT(0).

If you are using SuperZAP to zap modules, it takes different commands because 
the COBOL 6 sections are in a different class name.

...those are the biggest differences that we've hit.
--


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