PeaCOBOL
v1.3.0Complete User Guide
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

CodeMeaningAction
0CompatiblePromote
2IncompatibleFix with copybook maintainer
3Parse errorFix syntax; fix encoding

Integrating with release

Run in CI: peacobol db2-check . --fail-on-incompatible. Block merge if exit code 2.