Skip to content

Generated EbcdicDecoderUtil.unpackComp3 turns corrupt packed data into ZERO instead of failing #3949

Closed

Description

@squid-protocol

Noticed while building the Cultural Gauntlet's part 3 (#3834, PR #3947); not yet reproduced by a dedicated test.

What: the generated EbcdicDecoderUtil.unpackComp3 returns BigDecimal.ZERO for packed-decimal bytes that aren't valid COMP-3: a bad digit nibble, or a sign nibble outside A–F. On the mainframe those bytes raise a data exception (S0C7) and the step abends. So a converted job silently turns corrupt money into 0 and keeps going, and the equivalence harness can't see the difference.

Fix direction: throw on an invalid nibble, as the zoned-decimal reader already rejects non-digits (#3831). Or make it configurable (data.invalid_packed: fail | zero), defaulting to fail with the S0C7 behaviour documented.

Test: a valid packed field decodes; a bad digit nibble and a bad sign nibble each raise, rather than returning 0.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    data-integrity
    legacy-modernization
    on Sep 28, 2026
  2. added a commit that references this issue on Sep 28, 2026
  3. added
    status: pending-release
    on Sep 28, 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

    bugdata-integritylegacy-modernizationpriority: mediumstatus: pending-release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions