openmainframeproject / openmainframeproject/cobol-programming-course

Optimization possible in CBL0106.cbl

Open
#309 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
COBOL
Stars
3.6k
Forks
721
Avg merge
11d 16h
Merged PRs (30d)
1

Description

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

...

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open COBOL Programming Course #3 - Advanced Topics/Challenges/Debugging/cbl/CBL0106.cbl and inspect the OVERLIMIT table and SUB1 declaration. Compare the example with the recommended indexed-array form, then verify that the educational example still works as intended after the change.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.