feat: Modernize CBACT01C COBOL batch program to Java 17#166
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
feat: Modernize CBACT01C COBOL batch program to Java 17#166devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Rewrite CBACT01C.cbl as a Java 17 application using records, sealed types, and modern idioms - Model all COBOL data structures (CVACT01Y, CODATECN copybooks) as Java records - Implement DateConverter replacing the COBDATFT assembler routine - Handle signed zoned-decimal (overpunch) encoding/decoding with full round-trip support - Produce identical output files: OUTFILE, ARRYFILE, VBRCFILE - Add 25 JUnit 5 tests covering parsing, encoding, date conversion, business logic, and end-to-end execution - Include MIGRATION_NOTES.md with complete field mapping documentation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Rewrites the COBOL batch program
CBACT01C.cbl(from the CardDemo mainframe application) as a standalone Java 17 CLI application under a newjava-modernization/directory. The program reads 300-byte fixed-length account records from a flat file and produces three output files (OUTFILE, ARRYFILE, VBRCFILE), replicating the original business logic:{/},A-I/J-R)YYYY-MM-DD→YYYYMMDD) replacing theCOBDATFTassembler routineIncludes 25 JUnit 5 tests covering parsing, encoding round-trips, date conversion, business logic, and full end-to-end execution against the repo's 50-record
acctdata.txtsample file.A detailed
MIGRATION_NOTES.mddocuments every COBOL-to-Java field mapping for both copybooks (CVACT01Y, CODATECN) and all three output file formats.Review & Testing Checklist for Human
AccountRecord.parseSignedZonedDecimal()andOutputAccountRecord.formatSignedZoned()matches the COBOL ASCII zoned-decimal convention. The round-trip tests only cover a handful of values; negative inputs from real data are not represented in the sample file.USAGE IS COMP-3fields (debit in OUTFILE/ARRYFILE) are rendered as human-readable signed strings (e.g.,+000000252500) rather than actual packed-decimal bytes. If downstream consumers expect binary COMP-3, this will need a packed encoder. SeeformatComp3Display().AccountRecord.parse()byte offsets match the CVACT01Y copybook exactly (300-byte record: 11+1+12+12+12+10+10+10+12+12+10+10+178). An off-by-one would silently corrupt fields.cd java-modernization && JAVA_HOME=/path/to/jdk17 mvn clean test— all 25 tests should pass.Notes
ACCT-EXPIRAION-DATE(missing 'T') is preserved intentionally in the Java field names for traceability.ACCT-ADDR-ZIPis parsed from the input record for completeness but is not used by any business logic, matching the original COBOL behavior.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/afe3d671c8b04d79aa65ff258f98ca37