Skip to content

CobolRecords / CobolEdit are generated only with a VSAM store, but every port ticket requires them #4039

Closed

Description

@squid-protocol

The defect

SkeletonForges.sources() (cobol_to_java_skeleton_forges.py) writes the CobolRecords and CobolEdit runtimes only when RepositoryForge planned at least one VSAM store: records_source() and edit_source() return None when self.stores is empty. Both classes are generated into entity/vsam/.

But the porting rules in every ticket (cobol_to_java_port_tickets.py) tell the porter to go only through these classes:

A project with no VSAM file (a CICS-only or DB2-only estate, or batch over sequential datasets) gets rules naming classes it doesn't have. The porter then either writes the forbidden hand-made parser, or references a class that doesn't compile. port_runner._RUNTIME_HELPERS also lists entity/vsam/CobolRecords.java and CobolEdit.java, and silently omits them when they're missing.

Proposed fix

Generate both runtimes into every project, as #4036 did for util/CobolCompare:

  • Emit them regardless of VSAM stores. Preferably move them to util/, where CobolCompare and EbcdicDecoderUtil already live, since they aren't VSAM-specific.
  • If they move, update the entity codecs' imports, port_runner._RUNTIME_HELPERS, and the rule texts that name the package.
  • CobolRecords bakes in the code page's zoned sign characters (__POSITIVE__ / __NEGATIVE__ from data.code_page); that stays the same.
  • Refresh the refraction snapshots (excerpts and all 6 full corpora). Today none of them generates these classes, so each gains two files and their guardrail-baseline entries.

Test

  • A project generated from an estate with no VSAM file contains CobolRecords and CobolEdit, and compiles (java-compile.yml).
  • The existing VSAM entity tests still find the codec calls.
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

    bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions