Thanks for the suggestion, but moving the two SUB-PARA's out of the PARA-1 to PARA-EXIT scope didn't remove the warning.
I *think* what is happening is that COBOL does not like branches to PARA-EXIT from any paragraph that PARA-1 itself performs, regardless of where they are placed. The only option that seems to work is to hoist the GO TO PARA-EXIT statement out of PERFORMed SUB-PARA's back into the mainline PARA-1 code. I had hoped to avoid those kind of changes (since there are a lot of them in the real code), but I guess I don't have a choice. Thanks again for your help. Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Arthur T. Sent: Monday, April 23, 2012 4:45 PM To: [email protected] Subject: Re: Why does Enterprise COBOL V4.1 optimization complain about a PERFORM loop? On 23 Apr 2012 12:36:08 -0700, in bit.listserv.ibm-main (Message-ID:<985915eee6984740ae93f8495c624c6c21e1d43...@jscpcwexmaa1.bsg.ad.adp.com>) [email protected] (Farley, Peter x23353) wrote: <Snipped> It's been a *long* time since I coded Cobol, but I suspect the compiler is right. SUB-PARA-1 is part of the PERFORM in line 33. Thus, as far as the compiler can tell, you're performing yourself from within the perform, which could easily lead to an endless recursion. Try moving both SUB-PARAs out of PARA-1 and give each their own EXIT. If you want that extra execution of -2, code it as another PERFORM. -- 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

