Repository navigation
Fix #4003: CICS harness models the condition machinery (HANDLE/IGNORE CONDITION, RESP/NOHANDLE, HANDLE ABEND, PUSH/POP) - #4016
Merged
Conversation
Comment on lines
+169
to
+170
| "{abcode=AEYH, cause=condition, condition=QIDERR, event=ABEND, exit={label=MAIN-ABEND, program=HCMAIN}, " | ||
| "outcome=exit}", |
Contributor
squid-protocol
force-pushed
the
fix/4003-conditions
branch
from
September 29, 2026 18:35
54f6847 to
494adf5
Compare
This was referenced Sep 29, 2026
Merged
squid-protocol
force-pushed
the
fix/4003-conditions
branch
from
September 29, 2026 18:58
494adf5 to
622f8ca
Compare
- HANDLE CONDITION / IGNORE CONDITION / ERROR as a per-level table in the stub (GGCHCND); RESP and NOHANDLE suspend it per command. A condition goes to its label, else ERROR's, else the default action (abend with its AEIx code). The last HANDLE or IGNORE for a condition wins. - Transfer of control is a real GO TO <labels> DEPENDING ON GG-GOTO after the command, the labels being every one the program's HANDLE commands name (handler_labels), as IBM's translator's GO TO ... DEPENDING ON. - HANDLE ABEND LABEL / CANCEL / RESET; an abend (EXEC CICS ABEND or an unhandled condition) goes to the first active exit from its level upward, deactivating it; with none (or ABEND CANCEL) the task terminates. ASSIGN ABCODE returns the current code. PUSH HANDLE suspends conditions, IGNOREs and the abend exit; POP restores them (INVREQ when empty). - Each program names itself to the stub on entry (GGCPENT), for the exit's program in the ABEND event. - CicsTask: abendOnCondition / abendToExit / abcode / abcodeFor; the ABEND event carries cause, condition, outcome and exit. cobol-stub: hc-perform-range passes all 4 scenarios. hc-abend-link waits only for LINK (#4004). 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
force-pushed
the
fix/4003-conditions
branch
from
September 29, 2026 19:09
622f8ca to
9672cc5
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 #4003
Part of #3989 (phase 3, lane B)
What
The stub runtime and translator now model CICS condition handling the way IBM's translator and runtime do.
GGCHCND) that maps a condition, by DFHRESP code, to its HANDLE CONDITION label index, IGNORE (-1) or the default (0). The last HANDLE or IGNORE for a condition wins. IBM, IGNORE CONDITION: "until a HANDLE CONDITION command for the same condition is encountered".GGCCOND), in order:GO TO <labels> DEPENDING ON GG-GOTOissued after the failing command, not a GOBACK.handler_labels). This is IBM's translator'sGO TO … DEPENDING ON DFHEIGDI.LABEL,CANCELandRESETare modelled.PROGRAMis refused by name, because no crucible case uses it.EXEC CICS ABENDor an unhandled condition, goes to the first active exit from its level upward. The exit is deactivated when it takes control. IBM, abend recovery: "starting at the logical level … proceeding to successively higher levels".ABEND CANCEL, the task terminates.GGCPENT, injected after the PROCEDURE DIVISION header). That name is the exit'sprogramin the ABEND event.ABEND abcode= cause= [condition=] outcome=exit|terminated [exit=PROG.LABEL]. The runner and the equivalence harness both read it.CicsTask):abendOnCondition(condition),abendToExit(abcode, cause, condition, program, label),abcode()(ASSIGN ABCODE) andabcodeFor(condition).abendonly onoutcome: terminated.Cells (side × status)
three-items: an ITEMERR label inside the PERFORM range.no-queue: QIDERR falls through the next paragraphs.five-items: the handlers are reached by fall-through with no condition raised.length-trap: LENGERR goes to the ERROR label outside the range.translator: LINK(CICS harness: LINK with by-reference COMMAREA and program levels (unlocks through 18 cobol-stub cells) #4004).Tests
handler_labels; the program-entry injection; refusals of HANDLE ABEND PROGRAM, other ASSIGN options and unknown conditions.test_cics_runtimes.py:cc, is driven through the whole condition table: HANDLE/IGNORE/ERROR/default, PUSH/POP/INVREQ, exit deactivation, RESET, ABEND CANCEL and ASSIGN ABCODE.CicsTask's abend API, run under javac.EQUIVALENCE_E2E=1fixture run passes on every side. CardDemo account view (which uses HANDLE ABEND LABEL) still passes 9/9 events.Generated output
CicsTask.javagains the abend API (intended). It is generated only for CICS transaction programs. No goldens change.Audits: ruff, mypy and dead-key show no new findings.
tool_regex_redos --ciis clean. Touched files are formatted.🤖 Generated with Claude Code