COBOL Std 11 Build and Compilation

From Webhuis wiki
Revision as of 11:20, 25 March 2026 by Martin (talk | contribs) (Created page with "== 11. Build and Compilation == === 11.1 Recommended cobc Flags === {| class="wikitable" style="width:100%" ! Flag !! Purpose |- | <code>-Wall</code> || Enable all warnings; treat unexplained warnings as defects. |- | <code>-Wtruncate</code> || Warn on MOVE where source is wider than destination. |- | <code>-debug</code> || Enable PERFORM stack checking in test builds. |- | <code>-O2</code> || Enable optimisation in production builds. |- | <code>-free</code> || Only if...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 gixpp before cobc for 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 .cbl source.


← Back to index