Skip to content

det: batch file I/O holes in estates without an application JCL job (no CobolFiles), and WRITE ... ADVANCING #6065

Closed

Description

@squid-protocol

Why

The 2026-10-22 non-burned translation-only survey (#6064 comment) has two gaps that cover about two-thirds of the hole statements in the local non-burned corpora (dsf, zopeneditor-sample: 124 hole statements over 10 programs):

hole reason statements
<OPEN/READ/WRITE/CLOSE> <file>: the generated project has no batch package (CobolFiles) to run files through ~50
WRITE ADVANCING / other phrases 33

Both are generic batch COBOL, not estate quirks, so they are likely to recur on any unseen batch estate.

1. No batch package unless the estate has an application JCL job

cobol_to_java_batch_forge.py BatchForge.sources() returns {} when self.applications is empty, so the batch runtime (CobolFiles, Sysout, CobolAbend, …) is generated only when the estate holds at least one application JCL job. det/program.py:has_batch() then finds no batch/CobolFiles.java, and every FD gets fd.why = "the generated project has no batch package…" (program.py ~L1029). Every file I/O statement becomes a hole.

dsf has no JCL at all. The unscheduled main-program path (the CardDemo CBTRN01C case: a main program with files, no USING, no COMMAREA) only counts when self.applications is already non-empty (bool(self.applications) and key in self.unscheduled, ~L343/L348).

Fix: emit the batch runtime when the estate has any batch program: an application job or an unscheduled main program with files. Treat a no-JCL estate's file-owning main programs as unscheduled batch steps, as CardDemo's CBTRN01C already is. A CICS-only estate (no FDs in a main program) must still get no batch package, as today.

2. WRITE … ADVANCING

det/stmt.py _write() (~L1000) holes anything after WRITE rec [FROM x]: "WRITE ADVANCING / other phrases". Model BEFORE/AFTER ADVANCING n LINE(S) | mnemonic | PAGE (IBM Enterprise COBOL Language Reference, WRITE statement, sequential files) for line-sequential and printer files: carriage control as IBM defines it for the record (ASA control byte when the file is ADV; the line/page skip otherwise). Refuse by name any phrase still not modelled (AT END-OF-PAGE/EOP with LINAGE, mnemonic names not in SPECIAL-NAMES), as a named hole, never a guess.

Sweep the class in the same PR: _write currently holes every trailing phrase, so check which others the surveys hit (INVALID KEY / NOT INVALID KEY on indexed/relative WRITE, END-WRITE) and model or name them separately, so the hole reason says which phrase.

Evidence constraints

  • No burned estate uses ADVANCING (grep over the 6 burned corpora: 0 files). Part 2 therefore can't reach L2+ on a burned estate: test it with unit and synthetic programs (language-crucible) against the IBM reference, and report it as translation-only until a burned program uses it. Don't build cases on dsf/zopeneditor/census repos (burned-only rule).
  • Part 1 regression: CardDemo/CBSA/GenApp batch must be unchanged (byte-identical generated estate where they have application jobs); the async credit-card estate (CICS-only, 0 JCL) must still get no batch package.
  • Afterwards: re-run the non-burned translation-only survey (det_survey.py --no-compile over dsf, zopeneditor-sample) and post the before/after counts here. Baseline: dsf 0 / 7 whole, 231 / 318 statements; zopeneditor-sample 2 / 5 whole, 595 / 632.

Activity

  1. added
    bug
    priority: high
    scope:core
    on Oct 22, 2026
  2. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host melek, lease renewed 2026-10-23T01:05Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.

  3. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Parked (owner, 2026-10-22): this issue was written from a translation-only look at the non-burned dsf / zopeneditor-sample corpora. They stay non-burned, and no fixes derived from them land before their real first-contact scan. Parked in churn (needs owner). Record: #6069.

  4. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

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

  5. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    The owner decided (2026-10-22); the bot applies it on its next tick.

  6. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 6065-20261022T2340Z (host melek) ended without a PR. plan-held on gen.py overlap with live worker 5003; all 3 slots busy, requeued

  7. squid-protocol commented on Oct 23, 2026

    @squid-protocol
    OwnerAuthor

    Slice 1 survey (det_survey.py --no-compile), before -> after:

    • dsf: 0/7 whole, 231/318 statements -> 0/7 whole, 309/334
    • zopeneditor-sample: 2/5 whole, 595/632 -> unchanged
  8. added a commit that references this issue on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugclaim:melekpriority: highscope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions