db2-check
db2-check: the copybook compatibility gate for Db2 estates
Static analysis for field alignment, datatypes and cardinality — before runtime finds out the hard way.
What it checks
- Copybook field names, types and lengths versus DDL.
- Data-incompatibility: wrong PIC, misaligned OCCURS, redefined variant drift.
- Carriage return/line discipline and encoding references.
- Deterministic rule set: no silent ignores.
Exit codes
| Code | Meaning | Action |
|---|---|---|
| 0 | Compatible | Promote |
| 2 | Incompatible | Fix with copybook maintainer |
| 3 | Parse error | Fix syntax; fix encoding |
Integrating with release
Run in CI: peacobol db2-check . --fail-on-incompatible. Block merge if exit code 2.