Phase 1: Foundation - Coding Standards and Common Utilities #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phase 1: Foundation - Coding Standards and Common Utilities
Summary
This PR establishes the foundational infrastructure for consistent COBOL coding practices across the repository by adding two key files:
CODING_STANDARDS.md (363 lines) - Comprehensive documentation covering:
*vs modern*>styles)STOP RUN)common-utilities.cbl (274 lines) - Reusable utility library providing:
VALIDATE-FILE-STATUSroutine handling codes 00, 02, 10, 23, 30, 35HANDLE-ERRORparagraph for graceful error recovery with loggingThe standards document references actual patterns found in existing examples (
merge_sort_test.cbl,sql_example.cbl, etc.) and promotes educational clarity. The utility module replaces the current pattern of immediateSTOP RUNon errors with proper error handling and recovery options.Review & Testing Checklist for Human
common-utilities.cblinto an existing example program (e.g.,merge_sort_test.cbl) and ensure it compiles and runs correctlyCODING_STANDARDS.mdagainst actual repository examples to confirm alignmentHANDLE-ERRORandVALIDATE-FILE-STATUSroutines work properly with various file status codes in a real programNotes
common-utilities.cblfile passedcobc -fsyntax-onlyvalidation but hasn't been integration tested with existing programsLink to Devin run: https://app.devin.ai/sessions/d42fef6d7b514805ae33e37f9f04d576
Requested by: @bnob-ship-it