Preparing CICS programs in IBM i
Learn about the steps required when preparing CICS® programs in IBM® i.
To create a program that includes EXEC CICS statements and MQI calls, perform these steps:- If necessary, prepare maps using the CRTCICSMAP command.
- Translate the EXEC CICS commands into native language statements. Use the CRTCICSC command for a C program. Use the CRTCICSCBL command for a COBOL program.
Include CICSOPT(*NOGEN) in the CRTCICSC or CRTCICSCBL command. This halts processing to enable you to include the appropriate CICS and IBM MQ service programs. This command puts the code, by default, into QTEMP/QACYCICS.
- Compile the source code using the CRTCMOD command (for a C program) or the CRTCBLMOD command (for a COBOL program).
- Use CRTPGM to link the compiled code with the appropriate CICS and IBM MQ service programs. This creates the executable program.
CRTCICSC OBJ(QTEMP/AMQSCIC0) SRCFILE(/MQSAMP/QCSRC) + SRCMBR(AMQSCIC0) OUTPUT(*PRINT) + CICSOPT(*SOURCE *NOGEN) CRTCMOD MODULE(MQTEST/AMQSCIC0) + SRCFILE(QTEMP/QACYCICS) OUTPUT(*PRINT) CRTPGM PGM(MQTEST/AMQSCIC0) MODULE(MQTEST/AMQSCIC0) + BNDSRVPGM(QMQM/LIBMQIC QCICS/AEGEIPGM)