openmainframeproject / cobol-programming-course

Training materials and labs for a "Getting Started" level course on COBOL
https://openmainframeproject.org/projects/cobol-programming-course/
Creative Commons Attribution 4.0 International
3.04k stars 589 forks source link

Optimization possible in CBL0106.cbl #309

Open fa573r opened 1 year ago

fa573r commented 1 year ago

Course Details

GitHub

Description

In CBL01016.cbl I've seen somthing that is not as it is recommended. The table / array 01 OVERLIMIT. is indexed with a separate variable: 05 SUB1 PIC 99.. Recommendation says,that an array should be addressed with e.g. 'indexed by SUB1.'. That normally improves performance (in this case irrelevant). Cause this is an educational site, students should be shown how to do it right and not how it was done in the beginning of COBOL.

Reproduction Steps

1. 2. 3. ...

Additional Context

No response