COBOL basics - IBM Mainframe

Improving a program is always possible, but no program deserves limitless effort. Before getting involved in COBOL details, examine the underlying algorithms for your program. For top performance, a sound algorithm is essential. The classic example is sorting, where a simple technique to sort a million items can take hundreds of thousands times longer than one using a sophisticated algorithm.

After deciding on the algorithm, look at the data structures. They should be appropriate for the algorithm. When your program frequently accesses data, reduce the number of steps needed to access the data wherever possible. After you have improved the algorithm and data structures, consider other details of the COBOL source code.

The best COBOL programs are those that are easily understood. When a program is comprehensible, you can assess its performance. If the program has a tangled control flow, then it will be difficult to both understand and maintain. The optimizer will also be limited when trying to improve the code. Although VS COBOL II allows segmentation language, you will not improve storage allocation by using it, because VS COBOL II does not perform overlay.

The information within this section will help you write programs that result in better generated code sequences and better use of system services. This section describes four general areas that affect program performance:

  • Coding techniques and considerations
  • Optimization
  • Options and tuning considerations
  • Programmer productivity

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

IBM Mainframe Topics