ebcdic-overpunch-decoding
Agent skill frombenchflow-ai/skillsbench
Reference for the EBCDIC "overpunch" / zoned-decimal sign convention where the units position of a numeric field is replaced with a letter that encodes both a digit and a sign. Useful when reading mainframe-style fixed-length tapes whose amount fields appear as digits followed by a letter (e.g. "0000000000123D" or "0000000000045M").
How to install ebcdic-overpunch-decoding
install ebcdic-overpunch-decoding
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench# or add only this skill to Claude Code: copy the folder
tasks-extra/cobol-gl-batch-reconcile/environment/skills/ebcdic-overpunch-decoding/
# into
~/.claude/skills/ebcdic-overpunch-decoding/ (all projects)
.claude/skills/ebcdic-overpunch-decoding/ (one project)
tasks-extra/cobol-gl-batch-reconcile/environment/skills/ebcdic-overpunch-decoding/SKILL.md
Apache-2.0Full file1# EBCDIC overpunch (zoned decimal sign)23On classic mainframe tapes, signed numeric amounts are stored as N-1 digits4followed by a single byte where the high-order bits carry the sign and the5low-order bits carry the final decimal digit. When the file is converted to6ASCII / printable form, the last byte is rendered as a letter (or a brace).78## Sign and digit table910| Char | Sign | Last digit | | Char | Sign | Last digit |11|------|------|------------|-------|------|------|------------|12| `{` | + | 0 | | `}` | − | 0 |13| `A` | + | 1 | | `J` | − | 1 |14| `B` | + | 2 | | `K` | − | 2 |15| `C` | + | 3 | | `L` | − | 3 |16| `D` | + | 4 | | `M` | − | 4 |17| `E` | + | 5 | | `N` | − | 5 |18| `F` | + | 6 | | `O` | − | 6 |19| `G` | + | 7 | | `P` | − | 7 |20| `H` | + | 8 | | `Q` | − | 8 |21| `I` | + | 9 | | `R` | − | 9 |2223Positive zero is `{`; negative zero is `}`. Both decode to magnitude 0 — keep24the sign attached so downstream arithmetic doesn't drop a debit's polarity.2526## A common defect2728The positive half of the table (`{`, `A`–`I`) is the visible-looking case and29is often handled first. The negative half (`}`, `J`–`R`) looks like ordinary30…
Excerpt shown under the repository's Apache-2.0 license.
