Compiling with the SQLIMS option
Use the SQLIMS
compiler option to enable
the IMS SQL
coprocessor and to specify IMS suboptions.
About this task
You can specify the SQLIMS
option
in any of the compiler option sources: compiler invocation, PROCESS
or CBL
statements,
or installation default. However, you cannot specify IMS suboptions when the SQLIMS
option
is the COBOL installation default. The IMS suboption string in the SQLIMS
compiler
option is only available to the IMS SQL coprocessor.
To use the IMS SQL coprocessor,
you must compile with the SQLIMS
option and IMS must be available
on the system on which you compile.
You can use standard JCL procedural statements to compile your program with the IMS SQL coprocessor. In addition to specifying the above compiler options, specify the following item in your JCL:
STEPLIB
override for the COBOL step,
adding the data set that contains the Db2® coprocessor services, unless these services
are in the LNKLST
. Typically, this data set is called xxxxxx.SDSNLOAD.
For example, for Db2 11
it might be DSNB10.SDSNLOAD, but your installation
might have changed the name.
For example, you might have the following lines in your JCL:
//STEPLIB DD DSN=IMS.SDFSRESL,DISP=SHR
Compiling a batch of programs:
If
you use the SQLIMS
option when you compile a source
file that contains a sequence of COBOL programs (a batch compile sequence), SQLIMS
is
in effect for only the first program of the sequence. Although you
can specify SQLIMS
upon compiler invocation, the
option is in effect for only the first program. If you specify SQLIMS
in
a CBL
or PROCESS
statement for a
program other than the first program in the batch, a compiler diagnostic
message is issued.