It is possible to enter a paragraph in either way: You can PERFORM a section, paragraph, or series of paragraphs (A THRU B). It is possible, but unlikely to have:
A. ...code PERFORM B THRU D. PERFORM C. ... GOBACK. B. code ... more code in B C. code ... more code in C D. code ... more code in D E. Now, assume that some statement in C causes an abend. Was it from the first PERFORM, where it just got "dropped into" on the way from B to D? Or was it the second PERFORM where it was directly PERFORM'd from paragraph A? I will admit that this code sequence is unlikely. But I don't really care. This is for my learning and whining pleasure <grin>. We don't having anything this unusual. What we have is more like one paragraph which reads a file. That is all it does. But it is PERFORMed from 6 different paragraphs. Which are themselves PERFORMed from more than one other paragraph each. We get a loop (in CICS to be exact) and I cancel the transaction. I am almost always in that "read" paragraph. With no idea where I came from, so doing diagnostics is difficult. And putting in "tracing" entries in production CICS code when we are "screamed" at about the "inordinate cost to run the z" is just not politically acceptable. -- 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 Tobias Schmid > Sent: Monday, April 25, 2011 2:32 PM > To: [email protected] > Subject: Re: Recursive PERFORM in COBOL > > > What triggered this is a desire on my part to __EASILY__ > detemine the > > PERFORM sequence that got me to a particular paragraph. > Right now, I > > must find the "PERFORM return" slot for the paragraph in > execution to > > determine which paragraph the PERFORM verb is in. And then > "loop" doing > > the same. And I'm not sure how to determine if a paragraph > was truly > > PERFORM'ed as opposed to "dropped into" from the preceeding > paragraph. > > Some sort of "stack" would make this much simpler for me. > > > I think the problem comes with the "dropped into". > There should be no way, to "drop" into a paragraph - but if so, > then there are goto's - where only performs should be. > > Or have I missunderstood something? > > Tobias Schmid > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

