Prepare CICS programs

 

To create a program that includes EXEC CICS statements and MQI calls, perform these steps:

  1. If necessary, prepare maps using the CRTCICSMAP command.

  2. 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 WebSphere MQ service programs. This command puts the code, by default, into QTEMP/QACYCICS.

  3. Compile the source code using the CRTCMOD command (for a C program) or the CRTCBLMOD command (for a COBOL program).

  4. Use CRTPGM to link the compiled code with the appropriate CICS and WebSphere MQ service programs. This creates the executable program.

An example of such code follows (it compiles the shipped CICS sample 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)

 

Parent topic:

Building your application on i5/OS


fg16500_