Propose complete TSQ record guards

Proprietary

Propose response and returned-length checks before a full copy of READQ TS output. Bind an approved fixed record size and existing exit to an exact source snapshot and command line. Require an existing fullword RESP, explicit signed halfword COMP or BINARY LENGTH and ITEM, and QUEUE or QNAME. Only an explicit approval of response 0 is supported. Prove that the input length equals both ordinary PIC X buffer widths. Check the response first and then require the returned length to equal that width. Preserve the command, item selection and every existing error action. Add no handler options, queue deletion, retry or transaction behavior. Require ordinary disjoint local storage and complete source. Aliases, pointers, alternate ENTRY, NEXT SENTENCE, unsupported options and unproven request lengths prevent a proposal. The approved exit must reach GOBACK or plain CICS RETURN within 64 statements and 16 paragraphs. Allow validated literal messages, literal local stores and bounded default initialization on that path. Source snapshots use fixed-format UTF-8 with consistent LF or CRLF endings and no byte order mark. Application-team review remains required. Successful receipt and matching length do not establish queue ownership, freshness or authorization.

io.moderne.mainframe.security.ProposeTsqReadRecordGuard

Required

Exact repository-relative source path covered by the approved contract.

Exact program ID. Retain quotes for a literal ID. Literal contents match case exactly.

Lowercase SHA-256 of the complete UTF-8 source text without a byte order mark. The approved contract must cover this exact snapshot. Any source change prevents application.

One-based EXEC CICS READQ TS line in the approved source snapshot.

Complete approved set of primary response numbers that permit copying this READQ TS output. This bounded complete-record proof requires an explicit list containing only 0 for NORMAL. No application policy is inferred. Separate values with commas.

Approved fixed record size in bytes. It must match both complete PIC X buffers and the proven request maximum.

Existing paragraph approved for every other response at this exact site. An optional IN or OF section qualifier is supported. The contract must establish that this path preserves required cleanup, messages and transaction behavior.

Provenance of the approved fixed-record, response and exit contract. Queue ownership, freshness and restored-value validation remain separate application requirements. The recipe records this input and does not fetch or infer the contract.

mod run . --recipe=io.moderne.mainframe.security.ProposeTsqReadRecordGuard \ -P sourcePath=security/cbl/VSQHGOOD.cbl \ -P programName=VSQHGOOD \ -P sourceSha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \ -P commandLine=15 \ -P acceptedResponses=0 \ -P expectedRecordLength=8 \ -P approvedExit='READ-ERROR IN ERROR-HANDLERS' \ -P contractSource='mainframe-fixtures/README.md fictional TSQ record contract'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.