We've previously spoken about how to use /COPY and /INCLUDE in our RPGLE programs. We also covered how to use the INCLUDE command in our CLLE programs.
This video demonstrates how to use copybooks in RPGLE and CLLE programs within Visual Studio Code for IBM i development. It builds on previous tutorials about /COPY and /INCLUDE directives, showing how to apply them in a real-world scenario using modern tooling.
Join me while I walk through using a real-world example in Visual Studio Code for IBM i
Key Concepts
Copybooks: Reusable code snippets (like data structures or prototypes) that can be included in multiple programs.
/COPY vs /INCLUDE:
/COPYis traditional and widely used in RPGLE./INCLUDEis more modern and preferred in free-format RPG and CLLE.
VS Code Integration:
Shows how to organize copybooks in folders.
Demonstrates how to reference them correctly in source members.
Uses Bob (Build Open Blocks) builder to compile programs with copybooks.
