On 16 Apr 2012 07:35:00 -0700, in bit.listserv.ibm-main you wrote:

>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.

What compiler were you working with?  What other changes did you make?
COBOL VS (the 1974 standard) had poor code generation for PERFORM and
PERFORM ... UNTIL was especially poor.  VS COBOL II V1R4 drastically
changed that with simplified linkage where paragraphs could only be
reached by PERFORM and in many cases PERFORMED paragraphs were moved
inline to eliminate the branching.  The compiler could detect where a
one byte field was initialized and never changed so it could use
immediate instructions (MVI, CLI) when the field was used in a MOVE or
COMPARE.  Making sure all sequential files had BLOCK 0 coded also did
wonders.

Clark Morris
>
>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

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to