This topic I cannot resist... Urrrrggghhhh... Having learned COBOL in the mid 70's, the instructor taught that PERFORM was to be used only in situations where you wanted to do a certain routine at several locations in the program. The teaching was also about "straight line" programming. Flow Charts were also part of the curriculum.
Having said that, I still use GO TO extensively, and have not kept up with the "modern" programming extensions and constructs. I've had many instances in my career where a "structured" program has been "straight lined" with extremely dramatic performance results. Mostly I believe that knowing Assembler language and how the COBOL compiler would generate the assembler code version of the program provided the reasons for my coding techniques. I would write the program as close to what the assembler code would be as possible. This would usually provide some great performance at run time (and at compile time). One example (out of several) was a program which normally took 4-6 hours to do its magic. When I re-wrote it due to the necessity of adding more functionality, I went ahead and "straight lined" it according to the logic of what the program was supposed to do. When the re-write was finished, the new program took 20 minutes to run the first time it was in production. I have several other examples with these type of results. Also, CICS used to treat the "HANDLE CONDITION" API as a GO TO, not a perform. Went to the Well in the early-mid 80's over that one with a bunch of certain "whiz-kids" who were trained under the good doctors premises. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN