Repository navigation
Fix #4004: CICS harness models LINK with program levels and a by-reference COMMAREA - #4018
Merged
Merged
Conversation
Contributor
This was referenced Sep 29, 2026
Merged
…rence COMMAREA - A task is one process: a generated driver (GGTASK) names the first program, and GGCRUN (RECURSIVE, generated per case) runs each level's program and whatever it XCTLs to, CANCELing it after each run so the next one starts with fresh WORKING-STORAGE. - LINK: GGCLINK checks (LENGERR RESP2 11 outside 0-32763, PGMIDERR RESP2 1 for a program the CSD does not define, programs.cfg) and records the event; the target then runs at the next level on the caller's own storage, with EIBCALEN = LENGTH (0 without COMMAREA). Each level has its own handler table, fresh on program entry and the caller's again on return. - RETURN below level 1 returns to the linking program; its event carries the LINK COMMAREA as the caller now sees it. A GOBACK is a RETURN. - An abend whose exit is at a higher level unwinds: each lower level leaves, and GGCLRET at the exit's level GOes TO its label. - Every stub event names its issuing program (pgm=). - CicsTask: link / level / linkLength / run / withPrograms / withProgram / withSnapshot; below level 1 an XCTL runs its target at the same level. The Java driver runs tasks through CicsTask.run and records events with their issuer and COMMAREA snapshots. - Forge: programs reached only by LINK / XCTL get runTask(CicsTask) too, so the harness can drive them at their level. cobol-stub: ca-link-lengths (4) and hc-abend-link (5) now pass. Part of #3989. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
squid-protocol
marked this pull request as ready for review
September 29, 2026 19:19
squid-protocol
force-pushed
the
fix/4004-link
branch
from
September 29, 2026 19:19
c426b2a to
19a3888
Compare
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.
Fixes #4004
Part of #3989 (phase 3, lane B)
What
One process per task. The COBOL side now runs a whole task in one GnuCOBOL process instead of one process per XCTL hop:
GGTASK, the driver: the EIB (now including EIBTRMID) and the first program.GGCRUN, aRECURSIVEdispatcher: it runs a level's program, then any XCTL target, and CANCELs each program after its run so the next run starts with fresh WORKING-STORAGE, as a new CICS program instance does.LINK (IBM, EXEC CICS LINK):
GGCLINKrecords the event. It raises LENGERR RESP2 11 when LENGTH is outside 0–32763, and PGMIDERR RESP2 1 when the CSD does not define the program. The runner writes the CSD's programs toprograms.cfg; per SPEC §2, program autoinstall is off.caller_commarea: the LINK COMMAREA as the caller now sees it. A GOBACK counts as a RETURN.GGCLRETat the exit's level GOes TO the exit label (the CICS harness: condition machinery (HANDLE/IGNORE CONDITION, RESP/NOHANDLE, HANDLE ABEND, PUSH/POP HANDLE) #4003 machinery).Other stub and translator changes:
pgm=).CicsTask):link(program, commarea, length)andlink(program). The callee is aCicsTaskof its own at level+1 that shares the task's events, terminal and TS store, and it gets the caller's COMMAREA object itself.level(). EIBCALEN at a LINKed level is CicsTask event model: SEND TEXT length/options, RECEIVE-MAP event, COMMAREA length (Java side, 28+ cells) #4009'seibcalen(), which gives the LINK LENGTH, or 0 without a COMMAREA.run(program)runs level 1 plus its XCTL chain.withPrograms(Programs)suppliesdefinedandrun.withSnapshotcopies a COMMAREA when an event records it, because a LINK area changes later.withProgramsets the level's program, and each event names itsissuer.CicsTask.run. LINK and XCTL reach the services'runTask.runTask(CicsTask), with a Javadoc that says they run at a LINK/XCTL level. The harness can drive them now.CicsTask.javais emitted whenever there is a CICS program.test_cics_endpointsis updated to match.Cells (side × status)
Tests
pgm=; the Java LINK and level-RETURN events.CicsTask.linkthrough a by-reference StringBuilder, covering EIBCALEN, PGMIDERR, LENGERR, XCTL at level 2, implicit RETURN, and the terminal read once per task.EQUIVALENCE_E2E=1fixture run passes, and CardDemo account view still passes 9/9 events.Audits: ruff, mypy and dead-key show no new findings. Touched files are formatted.
🤖 Generated with Claude Code