Move existing table bounds checks before writes

Proprietary

Move an adjacent exact subscript check before a MOVE to one fixed OCCURS table destination. The existing check must reject values below one or above the declared limit through a branch ending in GOBACK, plain CICS RETURN or a proven direct jump to a terminal exit. Require disjoint ordinary storage, equal-width PIC X source and destination, and one ordinary integer subscript. Keep both statements in the same sentence and preserve fixed-format layout. Do not infer a new threshold, exit, append policy or count update. Preserve up to 16 existing rejection statements ending in that exit. Allow CONTINUE, simple EXIT and plain DISPLAY of quoted ASCII messages. Allow bounded literal MOVEs to disjoint ordinary standalone scalar fields. Reject writes to the operation operands or checked value. Limit each MOVE to 16 receivers and each text literal to 256 characters. Integer literals have at most 18 digits and must fit numeric receivers. Unknown calls, field reads, nested branches and other effects prevent reordering. Preserve every accepted error action in its original order. Prove equivalent guards over all integers using full comparisons, AND, OR, NOT and parentheses. Bound the proof to 64 terms and 16 parenthesis levels. Preserve the complete original predicate. Different rejection ranges, unchecked invalid values and unsupported terms prevent reordering. For a direct GO TO exit, prove an unconditional path to a terminal exit within 64 statements and 16 uniquely resolved paragraphs. Permit simple no-ops, literal DISPLAY and bounded literal MOVE stores into validated local scalar fields on that path. Stores require complete ordinary source and unaliased storage. Preserve the jump, every target paragraph and all existing messages. Source-mode barriers, ALTER, cycles, fallthrough, ambiguous targets and other effects prevent that jump proof. A jump path may also end in exactly EXEC CICS RETURN END-EXEC with no options. Validate the complete embedded command and retain the existing path budgets and source barriers. This exits the current CICS logical level. It does not establish that the whole task terminates. Commands with response, routing, data-passing or activity options remain outside this proof. Preserve the original return command and report its actual source line. Also permit bounded default INITIALIZE on these terminal jump paths. Validate at most 16 local fields or groups and 64 elementary writes. Require complete ordinary unaliased storage. Integer defaults are zero and PIC X defaults are spaces within 256 characters per field. VALUE and FILLER phrases, replacement phrases, FILLER members, tables and unsupported storage prevent this proof. An explicit TO DEFAULT retains default behavior. Preserve every initialization and message before the existing terminal.

io.moderne.mainframe.security.MoveTableBoundsChecksBeforeWrites
mod run . --recipe=io.moderne.mainframe.security.MoveTableBoundsChecksBeforeWrites

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