Propose COBOL COMMAREA display length guards
ProprietaryGuard a plain DISPLAY that reads an incoming COMMAREA under an explicit approval of its original output. Require exact caller and ordinary COPY snapshots, a complete admitted entry interval and an approved existing terminal exit. Derive the required received count from the operand offset and its full read width. Support fixed character fields, groups and literal slices. Require a concrete short arrival. Retain that conditional finding when an unresolved exit or layout prevents an edit. Propose a typed IF sentence only when every arrival has a known unchanged received count and at least one accepted arrival remains. Preserve every original byte outside the guard. Reprove the same DISPLAY with exactly the original accepted arrivals and the same read extent. Keep native counts above 9999, aliases, unknown effects, alternate entries, NEXT SENTENCE and incomplete source unresolved. The contract approves the original output and the exit behavior. The proof does not establish classification, allocation size or successful output. Application team review remains required. Do not remove output, mask fields, truncate values or invent an error routine. Preserve known received counts after a supported incoming-area MOVE or plain character DISPLAY only when they cover its complete read extent. Keep paths with an earlier short read unknown. They cannot authorize a later guard insertion. Successful output remains unproven.
io. moderne. mainframe. security. ProposeCommareaDisplayLengthGuardRequired
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 entry and exit contract must cover this exact snapshot.
JSON object mapping every ordinary data COPY name to its approved lowercase SHA-256.
Explicit approval of REQUIRED_ORIGINAL_DISPLAY at this site. The original DISPLAY is approved and required on accepted input. Insufficient received bytes must take the approved exit without executing this DISPLAY.
One-based DISPLAY line selected by the approved source contract.
Exact outermost-first dotted declaration name of the incoming LINKAGE area.
Exact outermost-first dotted declaration name of the actual received byte count at normal entry. Its storage must be separate from the area.
Smallest admitted incoming byte count. Every integer through the maximum must be admitted by the approved contract.
Largest admitted byte count. Must be at most 32767 and no larger than the declared incoming record. The complete interval must fit the existing numeric proof.
Existing paragraph approved for insufficient received lengths 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 entry and exit contract. The recipe records this input and does not fetch or infer the contract.
mod run . --recipe= io. moderne. mainframe. security. ProposeCommareaDisplayLengthGuard \
-P sourcePath= security/ cbl/ VDLGBODY. cbl \
-P programName= VDLGBODY \
-P sourceSha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
-P copybookSnapshots= '{}' \
-P displayPolicy= REQUIRED_ORIGINAL_DISPLAY \
-P displayLine=15 \
-P commarea= DFHCOMMAREA \
-P receivedLength= DFHEIBLK. EIBCALEN \
-P minimumLength=0 \
-P maximumLength=16 \
-P approvedExit= 'LENGTH-ERROR IN ERROR-HANDLERS' \
-P contractSource= 'mainframe-fixtures/ README. md fictional incoming-area 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.