Skip to content

Answer key: copybook record layouts are not keyed (only programs' own DATA DIVISION) #3602

Closed

Description

@squid-protocol

The answer key's records (the "record fields" ledger field) are each PROGRAM's own DATA DIVISION items. COPY members are not expanded, and copybook files are not keyed at all. The record layouts that modernization output depends on mostly live in copybooks, so they have no independent check. Examples:

  • CardDemo's app/cpy/*.cpy (CVACT01Y account record, CVTRA05Y transaction record, …);
  • CBSA's src/base/cobol_copy.

The #3575 records census (PR #3586) made this visible, and docs/language_status/cics_mainframe_facts.md now says so.

Proposal

  • Key: draft a copybooks section. For every COPYBOOK_EXTS file, record its item tree from _data_items (as programs do), plus each item's storage span: offset and bytes, laid out with the same arithmetic copybook_layout_units uses for the IBM symbolic-map oracle (BMS screen fields censused; symbolic maps checked against IBM's generated copybooks (#3575 part 3) #3599).
  • Ledger: add a field comparing the key against the engine's record_data for copybook files, by name + PIC and by offset.
  • Census: a sampled copybooks suite, like records, that also asks for offsets on a subset of records.
  • Oracle, where one exists: a copybook whose layout is also documented elsewhere in the repo (e.g. a VSAM RECORDSIZE in the CSD) can check the total record length.

Part of the honest-coverage follow-ups (#3575 family).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacy-modernization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions