COBOL

COBOL

COBOL

COBOL is responsible for the efficient, reliable, secure, and unseen day-to-day operations of the world's economy.

 View Only
  • 1.  IBM Enterprise COBOL V6+ - Disabling optimizations when the CICS option is active

    Posted yesterday

    Hi,

    I note that the IBM Enterprise COBOL compiler's binary code optimizations seem to be completely disabled when the CICS compiler option is enabled:
    - no inlining, despite the INLINE option
    - almost identical code in OPTIMIZE(0), OPTIMIZE(1), OPTIMIZE(2) modes

    The only effect of the OPTIMIZE(1) / OPTIMIZE(2) options is the removal of unreachable code.
    OPTIMIZE(2) reorders certain MOVE / INITIALIZE instructions according to memory addresses.

    The CICS options used are:
    - CICS("APOST")
    - CICS("COBOL3")
    - CICS("SP")

    Without the CICS compiler option, and same other compilation options, optimizations are indeed enabled by the INLINE and OPTIMIZE(1) or OPTIMIZE(2) options.

    I tested with the compiler versions available to me:
    - COBOL V6R4 'P230615'
    - COBOL V6R4 'P240416'
    - COBOL V6R4 'P241216'
    - COBOL V6R5 'P250507'

    No conflicts or restrictions are indicated regarding the use of the CICS compilation option in the reference documentation...
    Is this an oversight?
    Is this a compiler flaw?
    Do you see the same thing? (Compile with the CICS options, OPTIMIZE(1|2), INLINE, and LIST to get binary code expansion).

    Thanks.



    ------------------------------
    Denis FALLAI
    BPCE SI, BPCE group.
    ------------------------------


  • 2.  RE: IBM Enterprise COBOL V6+ - Disabling optimizations when the CICS option is active

    Posted 6 hours ago

    Simply using the CICS option vs. not using it shouldn't have any effect on which optimizations the compiler attempts. The presence of actual CICS calls in a program might have some effect - not in the sense of globally disabling any optimization, but causing optimizations to make different decisions in the presence of differences in the code. But no, I know of no reason why the CICS option would have any impact on the behaviour of paragraphs being inlined or of any of the other numerous optimizations we attempt. Most optimizations are situational, so we certainly can't conclude that NO optimizations are being run without further investigation.

    I can't comment in any more detail without seeing the actual program(s) in question, along with compiler options, etc. Can you please open a Case?



    ------------------------------
    Mike Chase
    Lead Developer, watsonx Code Assistant For z Code Optimization Advice
    Developer, Enterprise COBOL
    mike.chase@ca.ibm.com
    ------------------------------