Processing SQL statements by using the IMS coprocessor
The IMS coprocessor processes SQL statements at compile time.
To process SQL statements by using the IMS coprocessor, perform the following action:
- Submit a JCL job to process the IMS application that
contains SQL statement. Include the following information:
- Specify the SQLIMS compiler option when you compile your program:
The SQLIMS compiler option indicates that you want the compiler to invoke the IMS coprocessor. To use IMS co-processor and use the default options, specify just SQLIMS.
For example:
//COBOL1 EXEC PGM=IGYCRCTL, // PARM='LIST,XREF,CP(37),SQLIMS'
The following derault option values will be used by the IMS coprocessor:
- PERIOD
- Period (.) will be recognized as the decimal point indicator in decimal or floating point literals within the SQL statement.
- APOSTSQL
- Apostrophe (') as the string delimiter and the double quotation mark (") as the SQL escape character within SQL statements.
In addition, the COBOL CODEPAGE option will be used to determine what CCSID the source program is written. Currently, only EBCDIC CCSID 37 and 1140 are supported.
- Include DD statements for the following data sets in the JCL for your compile step:
- IMS load library (IGYV5R10.SQGYCOMP)
The IMS coprocessor calls IMS modules to process the SQL statements. You therefore need to include the name of the IMS load library data set in the STEPLIB concatenation for the compile step.
- Library for SQL INCLUDE statements
If your program contains SQL INCLUDE member-name statements that specify secondary input to the source program, you need to also specify the data set for member-name. Include the name of the data set that contains member-name in the SYSLIB concatenation for the compile step.
- IMS load library (IGYV5R10.SQGYCOMP)
- Specify the SQLIMS compiler option when you compile your program: