THURSDAY, SEPTEMBER 24, 2026
cobol
cobol: Fix missing prototype in stored-char-length.cpy
Corrects the stored-char-length.cpy copybook to include a function prototype.
The stored-char-length.cpy copybook incorrectly defined a function with the same name as the copybook, but without a prototype, causing issues for programs that relied on it. This commit adds the necessary PROTOTYPE definition, resolving the conflict and ensuring correct program behavior.
In Details
The stored-char-length.cpy copybook mistakenly declared a function named STORED-CHAR-LENGTH with an empty body instead of its prototype. This commit introduces the PROTOTYPE declaration for this function within the copybook and adds a corresponding CBL file to validate its presence, resolving conflicts for programs that use it.
For Context
- copybook
- A file containing COBOL data descriptions that can be shared and reused across multiple programs. It helps in maintaining data consistency.
- prototype
- In programming, a function prototype declares a function's name, return type, and parameters without providing the function's body. It allows the compiler to check function calls.
- CBL
- A file extension commonly used for COBOL source code files.