Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions docs/language_status/oracle_assumptions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/language_status/register/C12.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: "DIFFERS (the numbers) / ASSUMED (the interface)"
title: "FUNCTION RANDOM — the numbers DIFFER from z/OS, the interface ASSUMED; refused where IBM does not allow the seed"
area: "compiler"
summary: "FUNCTION RANDOM: the oracle's generator (glibc via GnuCOBOL), not IBM's unpublished one; a seed IBM does not allow refused"
reached: "translated, no proof yet (CBSA CRDTAGY1-5, INQCUST; GenApp LGICVS01)"
reached: "yes (CBSA CRDTAGY1-5, INQCUST: cbsa-crdtagy1..5, cbsa-inqcust, seeds 0 and a stated `\"taskn\"`); translated, no proof yet (GenApp LGICVS01)"
---
- **IBM** (Enterprise COBOL 6.4 Language Reference, RANDOM,
https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=functions-random): argument-1, if given, "must be zero or a
Expand Down
9 changes: 7 additions & 2 deletions docs/language_status/register/L3.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ status: "ASSUMED"
title: "WORKING-STORAGE with no VALUE clause — ASSUMED"
area: "LE"
summary: "WORKING-STORAGE with no VALUE clause: GnuCOBOL's spaces vs LE's STORAGE option on z/OS"
reached: "yes (CardDemo READACCT OUTFILE, 2 bytes)"
reached: "yes (CardDemo READACCT OUTFILE, 2 bytes; CBSA CRDTAGY1-5 container-short, WS-CONT-IN past a short container)"
---
- **What.** GnuCOBOL initialises such an alphanumeric item to spaces. On z/OS its first contents follow the LE
runtime option STORAGE (commonly binary zeros, or whatever the storage held): the program's source does not say.
- **Where it shows.** CBACT01C moves the 10-byte `CODATECN-0UT-DATE` to `OUT-ACCT-REISSUE-DATE`, but COBDATFT (A1)
writes only its first 8 bytes and `CODATECN-REC` has no VALUE clause. The last 2 bytes of each OUTFILE record's
reissue date are GnuCOBOL's spaces, and the Java side writes the same.
- **Assumed** to be spaces. A z/OS run with STORAGE(00) would give X'0000' there.
- **Where it shows (CBSA, #4270).** CRDTAGY1-5's `WS-CONT-IN` (261 bytes, no VALUE clause) is filled by GET CONTAINER
INTO; a container shorter than 261 bytes (scenario `container-short`) leaves the rest as it started, and PUT
CONTAINER writes all 261 bytes back: GnuCOBOL's spaces in the alphanumeric items and its zeros in the unsigned
numeric DISPLAY items (date of birth, review date), the same bytes on the Java side.
- **Assumed** to be spaces (zeros for a numeric DISPLAY item, as GnuCOBOL initialises it). A z/OS run with
STORAGE(00) would give X'0000' there.
7 changes: 7 additions & 0 deletions docs/language_status/register/Q3.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ reached: "CICS: yes (CBSA XFRFUN); batch: yes (synthetic UOWDEMO, `tests/equival
the task ends, rolled back with the task's recoverable files by SYNCPOINT ROLLBACK or an abend (X3). The transaction
is the harness's (`equivalence_cics.py`, a `TransactionTemplate` around the task); a deployment must give each task
the same unit of work. Reached: CBSA XFRFUN's four ROLLBACK paths are proven.
- **CICS, SQL after a SYNCPOINT ROLLBACK (#4270).** IBM: SYNCPOINT ROLLBACK ends the unit of work and the task's next
recoverable change starts a new one, committed when the task ends. The Java side rolls the task's Db2 connection back
at the SYNCPOINT ROLLBACK and goes on in the same transaction, so the SQL that follows is committed with the task, as
the COBOL side's Db2 commits it. Reached: CBSA INQACCCU's cursor failing inside CREACC's task (its SYNCPOINT
ROLLBACK, then CREACC's CONTROL updates and INSERTs: cbsa-creacc, cbsa-bnk1cac). A recoverable FILE changed after a
SYNCPOINT ROLLBACK is still undone with the task on the Java side (the transaction is marked rollback-only): no case
reaches one, and it would show as a difference.
- **CICS, EXEC SQL COMMIT / ROLLBACK.** IBM: both are invalid under CICS -- Db2 for z/OS answers -925 / -926 (SQLSTATE
2D521; Db2 for z/OS Codes) and the task's unit of work is CICS's (SYNCPOINT). The det translator REFUSES a CICS
program's ROLLBACK by name. A CICS program's COMMIT stays a reset of the SQLCA on the Java side and a real commit on
Expand Down
2 changes: 1 addition & 1 deletion docs/language_status/register/X24.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: "ASSUMED"
title: "A task started with a channel; the containers it leaves compared — ASSUMED (#4270)"
area: "CICS"
summary: "A task started with a channel (a scenario's `channel`: what a RUN TRANSID CHANNEL parent or a LINK CHANNEL caller passed), made its first program's current channel; the containers left on that channel compared at the task's end (dropped on an abend), byte for byte; RUN TRANSID children not run"
reached: "yes (async credit-card CRDTCHK, CSSTATS2, CSSTATUS, GETADDR, GETNAME)"
reached: "yes (async credit-card CRDTCHK, CSSTATS2, CSSTATUS, GETADDR, GETNAME; CBSA CRDTAGY1-5, an explicit CHANNEL(CIPCREDCHANN))"
---
- **What IBM documents** (CICS TS 6.x, "Scope of a channel"; RUN TRANSID CHANNEL: "the name of the channel that is
to be passed to the child task"; FETCH CHILD CHANNEL: "the channel returned by the child task"; LINK CHANNEL: the
Expand Down
2 changes: 1 addition & 1 deletion docs/language_status/register/X26.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: "ASSUMED (REFUSED where IBM is silent)"
title: "BIF DEEDIT, INQUIRE / SET TERMINAL UCTRANST, DFHVALUE — ASSUMED, REFUSED where IBM is silent (#4415 slice 1)"
area: "CICS"
summary: "BIF DEEDIT FIELD [LENGTH] edited in place in the region's EBCDIC page (CCSID 037); INQUIRE / SET TERMINAL UCTRANST as the CVDAs UCTRAN 450 / NOUCTRAN 451 / TRANIDONLY 452, the terminal's value stated by the run (the case TYPETERM's UCTRAN), a terminal RECEIVE after a SET refused; DFHVALUE(name) in the stub's programs is IBM's CVDA number; a DEEDIT field with no digit left, beyond 7-bit ASCII or past LENGTH, and the UCTRANST of a terminal other than the task's, refused"
reached: "yes (cics-crucible hc-deedit-uctranst, unreleased)"
reached: "yes (cics-crucible hc-deedit-uctranst, unreleased; CBSA BNK1DCS's UCTRANST store / restore and the BNK1 screens' DEEDIT: cbsa-bnk1dcs, cbsa-bnk1cac ...)"
---
- **BIF DEEDIT** (CICS TS 6.x, EXEC CICS BIF DEEDIT, https://www.ibm.com/docs/en/cics-ts/6.x?topic=summary-bif-deedit).
"alphabetic and special characters are removed from an EBCDIC data field", "the remaining digits right-aligned and
Expand Down
2 changes: 1 addition & 1 deletion docs/language_status/register/X27.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: "ASSUMED (the STARTCODE; REFUSED where IBM is silent)"
title: "RETURN ... IMMEDIATE, LINK ... SYNCONRETURN — ASSUMED, REFUSED where IBM is silent (#4270 slice)"
area: "CICS"
summary: "RETURN TRANSID ... IMMEDIATE: the task of TRANSID attached at once with the COMMAREA, ahead of any terminal input and any START request, the terminal's next operator step left alone; its EIBAID is not stated by IBM (the crucible runner gives none and a case never reads it), its STARTCODE TD; INVREQ RESP2 1 (no terminal), INVREQ RESP2 2 (below the highest level), LENGERR RESP2 11 return to the program; LINK ... SYNCONRETURN accepted and ignored (IBM: \"ignored if the link is local\"); IMMEDIATE without TRANSID, and both INVREQs at once (no terminal below level 1), refused"
reached: "yes (cics-crucible pc-return-immediate, unreleased)"
reached: "yes (cics-crucible pc-return-immediate, unreleased; CBSA BNKMENU and the BNK1 screens' PF3, the task's terminal a case's `\"termid\"`: cbsa-bnkmenu, cbsa-bnk1cac ...)"
---
- **RETURN IMMEDIATE** (CICS TS 6.x, EXEC CICS RETURN, https://www.ibm.com/docs/en/cics-ts/6.x?topic=summary-return).
IMMEDIATE "ensures that the transaction specified in the TRANSID option is attached as the next transaction regardless
Expand Down
2 changes: 1 addition & 1 deletion docs/language_status/register/X29.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: "ASSUMED (REFUSED where IBM is silent)"
title: "INQUIRE ASSOCIATION, DELETEQ TS, QUERY COUNTER, RECEIVE MAP TERMINAL — ASSUMED, REFUSED where IBM is silent (#4415 slice 2)"
area: "CICS"
summary: "INQUIRE ASSOCIATION(EIBTASKN) ODAPPLID / ODUSERID / ODFACILNAME / ODNETWORKID / ODFACILTYPE: the task's own origin data, the five values the run states (a case's `origin`, for a task terminal input started; unstated, refused), the facility type as IBM's CVDA, a command with no origin option refused (INVREQ RESP2 2 is ambiguous); DELETEQ TS: the whole queue and its READQ NEXT position, QIDERR, INVREQ for a name of binary zeros, RESP2 0; QUERY COUNTER (COUNTER / POOL / VALUE): the value left unchanged, INVREQ RESP2 201 for a counter that is not there, a value beyond a fullword, MINIMUM / MAXIMUM / NOSUSPEND, a task number other than EIBTASKN and the origin of a task not started by terminal input refused; RECEIVE MAP ... TERMINAL: the task's terminal, as every RECEIVE MAP"
reached: "INQUIRE ASSOCIATION, DELETEQ TS, RECEIVE MAP TERMINAL: yes (cics-crucible hc-inquire-deleteq, unreleased); QUERY COUNTER: no (the reference region has no named counters; unit tests on both runtimes)"
reached: "INQUIRE ASSOCIATION, DELETEQ TS, RECEIVE MAP TERMINAL: yes (cics-crucible hc-inquire-deleteq, unreleased; INQUIRE ASSOCIATION and RECEIVE MAP TERMINAL also CBSA BNK1CRA / BNK1DCS: cbsa-bnk1cra, cbsa-bnk1dcs, a case's `\"origin\"`); QUERY COUNTER: no (the reference region has no named counters; unit tests on both runtimes)"
---
- **INQUIRE ASSOCIATION** (CICS TS 6.x, CICS SPI command INQUIRE ASSOCIATION,
https://www.ibm.com/docs/en/cics-ts/6.x?topic=commands-inquire-association). ASSOCIATION "Specifies the 4-byte number of the
Expand Down
29 changes: 29 additions & 0 deletions tests/cobol_mainframe/test_equivalence_cics.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,35 @@ def test_events_are_compared_field_by_field():
assert ec.compare_events(cobol, java[:1])["diffs"][-1] == {"event": 2, "cobol": "RETURN", "java": None}


def test_send_control_is_an_event_both_sides_compare_by_options_and_cursor():
"""#4270 (CBSA's CLEAR key): the stub's SEND-CONTROL line is an event like CicsTask's, its options and CURSOR
compared -- a port that left it out, or sent other options, differs."""
res = {"events": ["SEND-CONTROL pgm=BNKMENU cursor=-1 opts=ERASE FREEKB", "RETURN pgm=BNKMENU level=1 transid= len=0"],
"screens": [], "text": [], "return": {"transid": "", "commarea": None}} # fmt: skip
cobol = ec.cobol_events(res)
assert cobol[0] == {"event": "SEND-CONTROL", "options": ["ERASE", "FREEKB"], "cursor": None}
java = [{"event": "SEND-CONTROL", "options": ["FREEKB", "ERASE"], "cursor": None},
{"event": "RETURN", "transid": None, "commarea": None}] # fmt: skip
assert ec.compare_events(cobol, java)["equal"] == 2
assert ec.compare_events(cobol, [{**java[0], "options": ["ERASE"]}, java[1]])["equal"] == 1
assert ec.compare_events(cobol, java[1:])["equal"] == 0


def test_a_tasks_terminal_and_origin_are_stated_facts_or_none():
"""#4270: "termid" / "uctranst" / "origin" -- the scenario's, else the case's; unstated None (the commands that
read them are then refused by both runtimes); a malformed one refused by name."""
case = {"termid": "T001", "uctranst": "NOUCTRAN"}
assert ec.terminal_facts(case, {"name": "s"}) == {"termid": "T001", "uctranst": "NOUCTRAN", "origin": None}
assert ec.terminal_facts({}, {"name": "s"}) == {"termid": None, "uctranst": None, "origin": None}
origin = {"applid": "CBSAREGN", "userid": "CICSUSER", "facilname": "T001", "networkid": "NET1",
"faciltype": "TERMINAL"} # fmt: skip
assert ec.terminal_facts(case, {"name": "s", "origin": origin})["origin"] == origin
for bad in ({"termid": "T 01"}, {"termid": "TOOLONG"}, {"termid": "T001", "uctranst": "YES"},
{"uctranst": "UCTRAN"}, {"origin": {**origin, "userid": ""}}, {"origin": {"applid": "A"}}): # fmt: skip
with pytest.raises(ec.Unsupported):
ec.terminal_facts({}, {"name": "s", **bad})


def test_low_values_and_spaces_in_a_commarea_are_different_values():
"""#4635: a field RECEIVE MAP left LOW-VALUES and one the port left spaces are different bytes to the next program
(COSGN00C: the RETURN COMMAREA's CDEMO-USER-ID); trailing spaces alone are still not data."""
Expand Down
Loading
Loading