Frank, there are not often more than two of us at the COBOL Cafe. Sorry for hijacking (didn't realise I was) but...
I have no problem in contributing to "best practice". Oh, I do, because I still see no genuine need for them. I have no problem contributing to "2nd-best practice". I don't think many people will think it simple to remove SECTIONs and THRUs (although it generally us, unless the program is a nightmare tangle of semi-recursive PERFORMs exited with GO TOs) but it is. I'm not sure many "bosses" will buy it though. And make one tiny step out of line (because some idiot was GO TOing to the middle of a THRU, for instance, or some paragraph within a SECTION from outside the SECTION) and you don't have the change covered in the spec... There's risk. I think it easy for experienced people, but somewhat daunting for the lesser-experienced (and anyone who spouts/parrots "THRU is safer!" or "SECTIONs are safer!"). And, be honest, this could easily involve changing a whole load of GO TOs to EXIT PERFORM. It is not the spelling of GO TO that is problematic (potentially). And then, continue being honest, some next-person-along is going to stick in a PERFORM ... THRU ... and immediately the point reached by the EXIT PARAGRAPH may change (depending on its location relative to the new paragraph). Then, presuming it gets caught in testing, there'll be a repeat test, with an actual GO TO, or the EXIT PARAGRAPH will be changed back to a GO TO. Job done. Will that happen? Sure. Will it happen mostly, or lots. Don't know. Given that, it's not there that I'm concerned about the insertion of a label. It is in the, what is laughably called, "main" part of the program. EXIT PARAGRAPH works equally there. But you can't use it as a replacement for a GO TO (even downwards) which skips the next label. So you end up with a mix anyway. And. Add a new label, and now the previously perfect EXIT PARAGRAPH stops "working" (contact the compiler developers, there's a bug and it isn't in my program). Now, I don't use GO TO (subject to the previously mentioned provisos) so I won't be using the various options of EXIT. I don't have a need. For someone else's program, I don't really mind whatever dross it is, as long as I get paid. Even with that outlook, there's just a part of me which goes "Ick, why the heck did they do that, that can only de-rail?". So, "2nd-best practice" - what's that to be for the "main". Just continue to use GO TO (if that is the codes bent) except for EXIT PERFORM/PERFORM CYCLE? Getting rid of THRU and having paragraphs in SECTIONs I can readily agree are good, but that is nothing to do with the availability of EXIT PARAGRAPH and EXIT SECTION. It is already possible without those things. Sure, people don't generally do it. If the presence of the new EXITs caused that to happen on any scale, that would be good. There'd still not be a *need* to use the EXIT forms. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
