COBOL Std 11 Build and Compilation
Jump to navigation
Jump to search
11. Build and Compilation[edit]
11.1 Recommended cobc Flags[edit]
| Flag | Purpose |
|---|---|
-Wall |
Enable all warnings; treat unexplained warnings as defects. |
-Wtruncate |
Warn on MOVE where source is wider than destination. |
-debug |
Enable PERFORM stack checking in test builds. |
-O2 |
Enable optimisation in production builds. |
-free |
Only if the project adopts free-format source throughout. |
11.2 GixSQL Pre-Processor[edit]
- Run
gixppbeforecobcfor any program containing EXEC SQL statements. - Verify the pre-compiler listing (
*_cbsql.out) for connection alias names before integrating with other programs. - Keep the pre-compiler output under source control for auditability.
- Do not hand-edit pre-compiler output — always regenerate from the
.cblsource.