Here's an example of advice for performance, from COBOL (on disk) Specifications IBM 1401, 1440, and 1460, from 1964, PDF courtesy of bitsavers.
"Perform and Alter Statements 1. The statement ALTER LABEL TO PROCEED TO NEXT- LABEL generates 10 characters of coding. 2. The statement PERFORM CALCULATION generates 18 characters of coding at the point in the program where the PERFORM occurs. In addition, CALCULA- TION is augmented by 4 positions for each PERFORM which references it. 3. CALCULATION should be positioned in the source program at the point where it will be executed most frequently simply by falling through from the preceding paragraph. 4. The option 2 statement, PERFORM CALCULATION 5 TIMES is efficient. Core requirements are about 45 positions at the point in the program where the PERFORM occurs and 4 positions additional at the end of CALCULATION. No additional core or time is required when a data-name instead of a literal is used to indicate the number of TIMES. 5. Option 4 of the PERFORM verb is handled best if the VARYING field is defined as alphanumeric and each of the fields in the expression has the same length." Yes, the compiler generated Autocoder. I'm very happy to have looked at the document this time, as I have noticed that the COBOL ENTER statement could be used to process Autocoder statements directly, embedded in the COBOL program. I have not encountered another COBOL compiler that supports ENTER other than processing it syntactically. In this compiler, it seems to be more of a "compiler directive" than a COBOL verb. Yes, I'm not quite sure what No. 5 means when it says the VARYING field should be alphanumeric... ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
