IMS SQL coprocessor
When you use the IMS SQL coprocessor (called SQL statement coprocessor by IMS), the compiler handles your source programs that contain embedded SQL statements.
When the compiler encounters SQLIMS statements in the source program,
it interfaces with the IMS SQL
coprocessor. All text between EXEC SQLIMS and END-EXEC statements
is passed to the coprocessor. The coprocessor takes appropriate actions
for the SQLIMS statements and indicates to the compiler
what native COBOL statements to generate for them.
Notes:
- The IMS SQL
coprocessor processes embedded
SQLIMSstatements, not embeddedSQLstatements. - IMS program
might contain
EXEC SQLstatements for accessing a Db2® SQL database,EXEC SQLIMSstatements for accessing an IMS DLI databases, or both. TheSQLoption enablesEXEC SQLstatements while theSQLIMSoption enablesEXEC SQLIMSstatements.
With the IMS SQL coprocessor, you can use statements in the following ways:
- Use
EXEC SQLIMSstatements in any nested program. - Use
EXEC SQLIMSstatements in COPYBOOKS. REPLACEstatements work inSQLIMSstatements.