COBOL PROGRAMMING GUIDELINES - IBM Mainframe

Command level COBOL programs comprise more than half of the CICS applications. This section mainly concentrates on the performance aspects of the most important areas of COBOL CICS programming.

COBOL Statements and Options to Avoid

CICS provides its own file management and terminal management facilities and therefore there is no requirement for any of the entries connected with data files that would normally appear in the Environment division and Data Division of the COBOL program.

CICS must be allowed to access files through its own services and therefore the use of any file access statements should be avoided. Their use causes an operating system wait, with the result that all CICS activity will stop and all transactions will be delayed.

Similarly many of the COBOL's special features were incorporated into the language with batch programs solely in mind and when user under CICS will have a detrimental effect on performance. The most obvious ones are SORT and REPORT WRITER options.

Once the program has been transferred to a production CICS system, it is advisable to compile using the OPTIMIZE compiler option. In most cases this will reduce the size of the program by between 5 and 10%. Even more beneficial would be to use a third party product such as CA-OPTIMIZER from Computer Associates International, Inc., where the benefits would be even greater.

COBOL Functions to Avoid

Two COBOL functions that will have an adverse effect on performance are EXAMINE and variable MOVE operations. Both of these will incur additional processing overhead of being expanded into subroutine calls if they are invoked. Wherever possible, consider using the COBOL REDEFINES clause to reuse areas in Working storage. Again this will have to be weighed against making the program readable and maintainable.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics