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 SQLIMS statements, not embedded SQL statements.
  • IMS program might contain EXEC SQL statements for accessing a Db2® SQL database, EXEC SQLIMS statements for accessing an IMS DLI databases, or both. The SQL option enables EXEC SQL statements while the SQLIMS option enables EXEC SQLIMS statements.

With the IMS SQL coprocessor, you can use statements in the following ways:

  • Use EXEC SQLIMS statements in any nested program.
  • Use EXEC SQLIMS statements in COPYBOOKS.
  • REPLACE statements work in SQLIMS statements.

Related references  
SQLIMS