Separating Db2 suboptions
Because of the concatenation of multiple SQL
option
specifications, you can separate Db2® suboptions (which might not fit in one CBL
statement)
into multiple CBL
statements.
About this task
The options that you include in the suboption string are cumulative. The compiler concatenates these suboptions from multiple sources in the order that they are specified. For example, suppose that your source file has the following code:
//STEP1 EXEC IGYWC, . . .
// PARM.COBOL='SQL("string1")'
//COBOL.SYSIN DD *
CBL SQL("string2")
CBL SQL("string3")
IDENTIFICATION DIVISION.
PROGRAM-ID. DRIVER1.
During compilation, the compiler passes the following suboption string to the Db2 coprocessor:
"string1 string2 string3"
The concatenated strings are delimited with single
spaces. If the compiler finds multiple instances of the same SQL
suboption,
the last specification of that suboption in the concatenated string
takes effect. The compiler limits the length of the concatenated Db2 suboption
string to 4 KB.