If your program contains EXEC SQL statements and MQI calls, perform these steps:
Include OPTION(*NOGEN) in the CRTSQLCI or CRTSQLCBLI command. This halts processing to enable you to include the appropriate WebSphere MQ service programs. This command puts the code, by default, into QTEMP/QSQLTEMP.
An example of such code follows (it compiles a program, SQLTEST, in library, SQLUSER):
CRTSQLCI OBJ(MQTEST/SQLTEST) SRCFILE(SQLUSER/QCSRC) + SRCMBR(SQLTEST) OUTPUT(*PRINT) OPTION(*NOGEN) CRTCMOD MODULE(MQTEST/SQLTEST) + SRCFILE(QTEMP/QSQLTEMP) OUTPUT(*PRINT) CRTPGM PGM(MQTEST/SQLTEST) + BNDSRVPGM(QMQM/LIBMQIC)