CKQC commands from CICS application programs

You can use the EXEC CICS LINK command to access most of the CICS®-MQ adapter control functions from CICS application programs.

To carry out an action such as starting the connection, your application program must link to the appropriate CICS-MQ adapter program and issue a CKQC command. Table 1 lists these programs and their functions.

Table 1. CICS-MQ adapter programs
CICS-MQ adapter program Alternative name accepted for compatibility Function CKQC command
DFHMQQCN CSQCQCON Start the connection to WebSphere® MQ CKQC START
DFHMQDSC CSQCDSC Stop the connection CKQC STOP
DFHMQRS CSQCRST Modify the connection (reset statistics or enable API-crossing exit) CKQC MODIFY
DFHMQSSQ CSQCSSQ Start or stop an instance of CKTI CKQC STARTCKTI or CKQC STOPCKTI
DFHMQDSL CSQCDSPL Display the status of the connection CKQC DISPLAY

Command syntax in application programs

Some commands issued by the application program must be padded with trailing spaces to make the length of the command equal ten characters.

When an argument follows the command, an extra space character must be added as a separator. The commands affected by this restriction and the number of trailing spaces required for each command are as follows:
Command Number of trailing spaces (not including the separator)
START 5
MODIFY 4
STARTCKTI 1
STOPCKTI 2
With all other commands the padding is optional.
This example illustrates how to pad adapter commands. The MODIFY command must be padded with 4 trailing spaces plus another space as a separator. Starting at the M in MODIFY, the argument Y is the twelfth character.

 EXEC CICS LINK PROGRAM('DFHMQRS ')
           INPUTMSG('CKQC MODIFY     Y')
                          ↑          ↑
                          ............
                          1          12

Passing parameters from a CICS application program

Use the following rules to determine how to pass parameters between CICS and WebSphere MQ:
  • The CICS transaction must be running on an attached terminal. If it is not, all WebSphere MQ commands are ignored.
  • If a CICS application program on an attached terminal is connected to WebSphere MQ, you must use the INPUTMSG option with EXEC CICS LINK to pass parameters, except at PLTPI time.
  • If you connect to WebSphere MQ at PLTPI time, you must use the COMMAREA option to pass parameters. If you use the INPUTMSG option, the command is ignored. However, the adapter STOP commands, CKQC STOP and CKQC STOP FORCE, cannot be run at PLTPI time, regardless of whether you use the INPUTMSG option or the COMMAREA option.