I have CA Intertest Batch and COBOL 6.2 here and I have NEVER been able to stop in ANY statement of an inlined paragraph.
But these are production-level programs that are far more complex than your example. Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Schmitt, Michael Sent: Friday, February 10, 2023 3:33 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to get MetalC "INLINE" report There are two cases for inlining: 1. The performed paragraph was only performed from one place 2. The performed paragraph was performed from multiple places I just tested CA InterTest Batch with COBOL 6.2 at OPT(2),INLINE. It definitely can stop (i.e. catch a breakpoint) set in case 1. For case 2, it only caught it in one of the places where it was inlined. Note that InterTest Batch runs the application code in a VM. The program I tested is: ---------------------------------- identification division. program-id. cobtest. data division. linkage section. 01 parm pic s9(04) binary. procedure division using parm. mainline section. perform inline. display parm. if parm not = 42 perform inline end-if. display parm. goback. inline section. add parm to parm. *> breakpoint set here compute parm = parm * parm. ---------------------------------- I don't know why this would be different in COBOL 6 than in previous COBOL. IBM COBOL has inlined code for a long time, and there's no difference in the generated code in that respect that I know of. Except for one thing: COBOL 6 is not good at identifying the inlined statements in the compile listing pmap. In the above case, the listing only gives the "add parm to parm" and "computer parm = parm * parm" statements once (where it first is inlined). The second time it is definitely inlining them, but just as generated instructions belonging to the "if parm not = 42" statement. I'd consider this to be a bug in the compiler. The listing pmap should show all source statements, at the place where they are executed. If they are inlined twice, they should be listed twice. -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Farley, Peter Sent: Friday, February 10, 2023 11:47 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to get MetalC "INLINE" report AFAIK, not the way inlining works on any z/OS compiler output I have ever seen. Recent versions of Enterprise COBOL, for instance, can inline performed paragraphs (and tell you that they did so) such that no HLL debugger known to me can let you stop inside the inlined code. If you have to debug E.COBOL inlined code you must recompile with the NOINLINE compiler option (or in the worst cases, NOOPT). 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN