Module lessons (2/2)
Copybook (COPY), REDEFINES and Level 88 Condition Names
Share records between dozens of sources with COPY REPLACING, overlay layouts on the same RAM via REDEFINES, and model states with Level 88 and SET TO TRUE.
What you'll learn in this lesson
- Include paths shared between multiple programs using
COPYand parameterize their prefixes withREPLACING. - Replace comparisons on magic codes with
88(Condition Names) and update their status withSET <nome> TO TRUE. - Reinterpret the same bytes in memory with multiple structural views using
REDEFINES.
Overview
Writing maintainable COBOL code means separating the shared data structure (Copybook) from the program logic and making business conditions self-explanatory.
A Copybook is an external file (typically a mainframe PDS library) containing record definitions, which the preprocessor inserts at compile time via COPY:
Sections covered in this lesson
- 11. Reusing paths with
COPYandREPLACING - 22. Condition-name at level
88and verbSET - 33. Multiple views on the same bytes with
REDEFINES - 4Try it yourself
Unlock "Copybook (COPY), REDEFINES and Level 88 Condition Names" and the full Course COBOL curriculum
Share records between dozens of sources with COPY REPLACING, overlay layouts on the same RAM via REDEFINES, and model states with Level 88 and SET TO TRUE.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Course COBOL plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.