Skip to content

DJ-69: Migrate CBSTM03A statement batch to Java + Spring Boot statement viewer - #234

Open
devin-ai-integration[bot] wants to merge 8 commits into
mainfrom
devin/1785419531-dj69-statement-modernization
Open

devin-ai-integration[bot] wants to merge 8 commits into
mainfrom
devin/1785419531-dj69-statement-modernization

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Implements Jira DJ-69: modernizes the CardDemo statement batch (app/cbl/CBSTM03A.CBL + app/cbl/CBSTM03B.CBL) into a new Java 17 Maven module carddemo-java, plus a Spring Boot web statement viewer replacing the COBOL-generated HTML statements. Built by two parallel workstreams (batch migration + viewer) against a locked statement JSON contract, then merged and wired end-to-end.

  • Contract (carddemo-java/docs/statement-contract.json + statement-contract.schema.json) — canonical statement JSON per DJ-69: {accountId, customer{firstName,lastName,addressLines[]}, cardNumber (masked), transactions[{transactionId,description,amount}], totalAmount}.
  • Generator (com.carddemo.statement.generator / parser / model) — ports the 1000-MAINLINE join: iterate cardxref.txt, look up customer (custdata.txt) and account (acctdata.txt), aggregate dailytran.txt transactions per card, compute totals; parses fixed-width layouts from app/cpy/ copybooks incl. COBOL signed-overpunch zoned decimals (e.g. 0000009190}-919.00). Run: cd carddemo-java && mvn compile exec:java → writes one statement-<accountId>.json per account into carddemo-java/output/statements/ (50 statements / 300 transactions from app/data/ASCII/).
  • Viewer (com.carddemo.statement.viewer) — Spring Boot + Thymeleaf: / lists statements, /statements/{accountId} renders name, address, masked card, transaction table and total; also GET /api/statements[/{accountId}]. Reads carddemo.statements.dir (default output/statements/); Jackson fails on unknown properties so contract drift surfaces immediately. Mock fixtures used during parallel development were removed; tests use fixtures under src/test/resources/statement-fixtures/.

Verification: (cd carddemo-java && mvn test) — 13 tests pass; (cd carddemo-java && mvn package -DskipTests) passes; viewer verified in-browser against real generated statements.

Ticket vs COBOL discrepancy (ticket wins, per instructions)

5000-CREATE-STATEMENT also emits customer middle name, current balance (ACCT-CURR-BAL) and FICO score (CUST-FICO-CREDIT-SCORE), and 3 combined address lines. The DJ-69 contract intentionally omits middle name, current balance, and FICO score, so the JSON and viewer do too.

Before — COBOL-generated HTML statement layout

The COBOL batch cannot execute off-mainframe (CBSTM03A dereferences TIOT/PSA pointers; GnuCOBOL run segfaults), so the BEFORE capture reproduces the exact HTML structure emitted by 5100-WRITE-HTML-HEADER/5200-WRITE-HTML-NMADBS/6000-WRITE-TRANS, populated with the real app/data/ASCII/ sample data.

Before: COBOL HTML statement

After — new web statement viewer (real generated data)

After: Spring Boot statement viewer

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/ceef61b01e144b39ad60fd42e2b198d7
Requested by: @HJscarr

@HJscarr HJscarr self-assigned this Jul 30, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant