Windows IBM COBOL application compile and link options

The compile and link options for building COBOL embedded SQL and Db2® API applications on Windows operating systems with the IBM® VisualAge® COBOL compiler are available in the bldapp.bat batch file.

Compile and link options for bldapp

Compile options:
cob2
The IBM VisualAge COBOL compiler.
-qpgmname(mixed)
Instructs the compiler to permit CALLs to library entry points with mixed-case names.
-c
Perform compile only; no link. Compile and link are separate steps.
-qlib
Instructs the compiler to process COPY statements.
-Ipath
Specify the location of the Db2 include files. For example: -I"%DB2PATH%\include\cobol_a".
%EXTRA_COMPFLAG%
If "set IBMCOB_PRECOMP=true" is uncommented, the IBM COBOL precompiler is used to precompile the embedded SQL. It is invoked with one of the following formulations, depending on the input parameters:
-q"SQL('database sample CALL_RESOLUTION DEFERRED')"
precompile using the default sample database, and defer call resolution.
-q"SQL('database %2 CALL_RESOLUTION DEFERRED')"
precompile using a database specified by the user, and defer call resolution.
-q"SQL('database %2 user %3 using %4 CALL_RESOLUTION DEFERRED')"
precompile using a database, user ID, and password specified by the user, and defer call resolution. This is the format for remote client access.
Link options:
cob2
Use the compiler as a front-end for the linker
%1.obj
Include the program object file.
checkerr.obj
Include the error-checking utility object file.
db2api.lib
Link with the Db2 library.

Refer to your compiler documentation for additional compiler options.