Skip to content

cics forge: an opaque DFHCOMMAREA takes the record its flows pass (#4464) - #4499

Closed
squid-protocol wants to merge 1 commit into
mainfrom
fix/4464-gen-4464
Closed

squid-protocol wants to merge 1 commit into
mainfrom
fix/4464-gen-4464

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #4464.

Problem

CardDemo's COSGN00C declares an opaque DFHCOMMAREA (LK-COMMAREA PIC X(01) OCCURS 1 TO 32767 DEPENDING ON EIBCALEN) and continues its pseudo-conversation with RETURN TRANSID(CC00) COMMAREA(CARDDEMO-COMMAREA). The engine pairs no COMMAREA with it for two reasons. Every XCTL into it is data-driven (via: moves). Its RETURN's callee is unresolved because the CSD also pairs CC00 with COCRDLIC through DEFINE PROGRAM(COCRDLIC) ... TRANSID(CC00). So the generated façade was handleTransaction(String) / handleLink(), and the java-facade side refused 11 of 12 scenarios.

Change (generator only: cobol_to_java_transaction_forge.py)

  • New CicsForge._plan_opaque_commareas pass. It runs for a program with no COMMAREA, no channel, and a LINKAGE DFHCOMMAREA that is an opaque byte area (one alphanumeric leaf, e.g. ODO PIC X). The program's COMMAREA becomes the record that flows into it pass:

    • its RETURN TRANSID to one of its own transactions (callee unresolved or itself)
    • any resolved LINK / XCTL / RETURN TRANSID reaching it

    That record is given as the estate's one DTO matching it on name, file, width and field count. Extended copies such as Cobil00cCarddemoCommarea do not match.

  • The gap names the reason when it refuses: the flows pass different records, a data-driven site into it passes another record name, or no DTO (or several) carries the record.

  • In the Generator: CICS facades type the COMMAREA per program, but a pseudo-conversation carries it across programs #4427 conversation typing, a RETURN TRANSID to the sender's own transaction counts as a self-RETURN, and the crossing notes name it.

COSGN00C now generates public Object handleTransaction(String transid, CarddemoCommarea request) and public CarddemoCommarea handleLink(CarddemoCommarea request). Its response is Object because the task can XCTL into programs with other DTOs, the same as COMEN01C. Nothing is special-cased for COSGN00C.

Generated-output impact, regenerated before and after:

  • CardDemo: only COSGN00C's service and controller signatures change, plus Javadoc crossing notes in other services.
  • CBSA / GenApp: byte-identical src/.

Evidence

Follow-up owed

#4490 (det façades copy the stub's signature) has not merged. Once it does, merge main and drop carddemo-signon from det_sweep_baseline.json with proof_sweep.py --det-only --skip-db2 --update-baseline. The det port of COSGN00C should then take the COMMAREA with no det change.

Note

The engine's _transaction_program resolves CC00 ambiguously because it treats DEFINE PROGRAM ... TRANSID as a transaction pairing. An explicit DEFINE TRANSACTION ... PROGRAM arguably outranks it. This PR doesn't change the engine; the generator copes either way.

🤖 Generated with Claude Code

)

COSGN00C's LINKAGE DFHCOMMAREA is an opaque ODO byte area, and the engine pairs
no COMMAREA with it (every XCTL into it is data-driven; its RETURN TRANSID(CC00)
to itself is unresolved because the CSD also pairs CC00 with COCRDLIC via a
DEFINE PROGRAM ... TRANSID). Its facade took none, so the equivalence harness's
java-facade side refused 11 of 12 scenarios.

The CICS forge now gives a program with an opaque DFHCOMMAREA the record that
its RETURN TRANSID to its own transactions (and any resolved flow into it)
passes, as the estate's single DTO for that record (name, file, width, field
count). It refuses by name in the commarea gap when the flows disagree, a
data-driven site names another record, or no single DTO carries it. A RETURN
TRANSID to the sender's own transaction counts as a self-RETURN in the #4427
conversation typing.

carddemo-signon resurfaced (port_surface.py equivalence) and re-proven:
runTask 12/12, java-facade 12/12; stale mark cleared, dropped from
facade_baseline.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol changed the title WIP: cics forge: an opaque DFHCOMMAREA takes the record its flows pass (#4464) cics forge: an opaque DFHCOMMAREA takes the record its flows pass (#4464) Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist labels Oct 5, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Superseded by the merge train #4524 (merged as 8137353), which carries this PR's commits plus a single regeneration of the generated files on top of main.

🤖 Generated with Claude Code

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

Labels

bug Unintended behavior or logic failure in the engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generator: COSGN00C's facade takes no COMMAREA, but its pseudo-conversation RETURNs one to itself (opaque ODO DFHCOMMAREA)

1 participant