Skip to content

det: JSON GENERATE CONVERTING ... TO JSON BOOLEAN (Part of #7524, #7709) - #7949

Draft
squid-protocol wants to merge 4 commits into
mainfrom
churn/7524-json-generate-converting
Draft

squid-protocol wants to merge 4 commits into
mainfrom
churn/7524-json-generate-converting

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

JSON GENERATE takes CONVERTING item TO [JSON] BOOLEAN | BOOL USING condition-name | literal [ALSO ...] (IBM Enterprise COBOL 6.4 LR, converting phrase format 1). A value matching the 88 (directly under the item) or the single-byte literal is written true, any other value false. Translated as a runtime boolean from the existing comparison / condition-name test (JsonGenerate.bool). Oracle-unbacked (X76, ASSUMED): no L2+ claim.

Refused by name: item not one-byte PIC X, an 88 not directly under it, a literal longer than one byte, an item inside a table, the same item in SUPPRESS ... WHEN / EVERY (IBM states none of these), and TO JSON NULL (format 2).

Stacked on #7947 (COMP-1, same files); merge #7947 first, then retarget to main.

Checklist: partial [c:bb8e1760] -- CONVERTING ... TO JSON NULL (format 2) is left; COMP-2, an elementary source, an ODO table inside a table and NAME OMITTED on a member stay refused because IBM is silent or calls them illegal

Class

JSON GENERATE phrases IBM defines that the det translator still holed. Sweep: COUNT, NAME (incl. OMITTED on the source), SUPPRESS / WHEN / EVERY, ODO tables, JSON-CODE, ON EXCEPTION, COMP-1 (#7947) are done; CONVERTING boolean is this PR.

Sibling gaps

No burned estate program uses JSON (census programs are non-burned: listed, not worked).

  • CONVERTING ... TO JSON NULL USING figurative (format 2): next slice.
  • JSON PARSE CONVERTING (boolean), JSON PARSE floats / tables (X77).
  • COMP-2 (IBM's picture illegal), elementary source, ODO table inside a table, NAME OMITTED on a member, BOOLEAN item in a table: refused by name, IBM silent.

Remaining slices

Format 2 (NULL); JSON PARSE CONVERTING.

Facts checked

  • IBM 6.4 LR page read (rlpsjsog.html): format 1 rules and example (data-a false, data-b true) match the tests. The page does not say which release added the phrase; the register says so and claims none.
  • det_port.py check: 270/270 ports unchanged (no burned program uses JSON).
  • tests/cobol_mainframe/test_det_json_generate.py, test_cobolrt_rules.py, test_cobolrt_api.py: 179 passed (incl. a JDK 17 runtime run of bool). audit_check.py: all clear. cobolrt_rules.py --check: consistent.

Lessons for agents

  • A new public JsonGenerate node factory needs its name in the CBL family plumbing list (cobolrt_rules.json) and cobolrt_api.py generate; one the translator emits by f-string shows as internal until set to public by hand (test_no_committed_port_or_generator_string_uses_an_internal_member).
  • Fixed-form test source past column 72 raises a LayoutError, not a hole: break long statements in test helpers.

🤖 Generated with Claude Code

squid-protocol and others added 4 commits November 6, 2026 16:45
…9 (Part of #7524)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…132Z

# Conflicts:
#	docs/language_status/register/X76.md
Translated from IBM's 6.4 definition: true on a match of the condition-name or
single-byte literal, else false; ALSO lists several. Refused by name: not a
one-byte PIC X item, an 88 not under the item, a longer literal, a table item,
and SUPPRESS ... WHEN on the same item. TO JSON NULL stays a hole.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol

Copy link
Copy Markdown
Owner Author

Waiting on an owner decision (asked privately, 2026-11-06). Nothing is needed from contributors; work resumes once it is answered.

Base automatically changed from churn/7524-20261106T2132Z to main November 6, 2026 22:50

This branch has not been deployed

No deployments
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