passing parameters, CICS adapter, INPUTMSG option, EXEC CICS LINK, messages, transient data queue (TDQ), CKQQ, transient data queue" /> From CICS application programs

 

From CICS application programs

We can use the EXEC CICS LINK command to invoke most adapter control functions from CICS application programs. The syntax of the EXEC CICS LINK commands we need, and examples, are given for each task described later in this chapter.

 

Command syntax in application programs

Some commands issued in this way must be padded with trailing spaces to make the length of the command 10 characters. When an argument follows the command, an extra space character must be added as a separator (see Figure 6). 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.

Figure 6. Padding 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('CSQCRST ')
           INPUTMSG('CKQC MODIFY     Y')
                          ^          ^
                          ............
                          1          12
Note:
This restriction applies only to commands issued from an application program; it does not apply to commands issued from the command line.

 

Passing parameters from a CICS transaction

Use the following rules to determine how to pass the parameters:

  • 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, use the INPUTMSG option with EXEC CICS LINK to pass parameters, except at PLTPI time.

  • If you connect to WebSphere MQ at PLTPI time, use the COMMAREA option to pass parameters. If you use the INPUTMSG option, the command is ignored.

    However, the adapter STOP commands:

      CKQC STOP
      CKQC STOP FORCE

    cannot be run at PLTPI time, regardless of whether you use the INPUTMSG option or the COMMAREA option.

 

EXEC CICS LINK interface messages

If you invoke the adapter operation functions START and STOP from an application program using EXEC CICS LINK, the resultant messages are written to both the system console and a transient data queue (TDQ) named CKQQ. When the application program returns from the LINK, it can read back the messages by repeating EXEC CICS READQ TD QUEUE(CKQQ) until the queue is empty. The following restrictions apply:

  • The TDQ queue name is CKQQ and cannot be changed. A sample TDQ definition is provided (in CSQ4B100), which defines CKQQ as an intra-partition TDQ.

  • The queue is not cleared before it is written to.

  • The messages are not time-stamped.

  • If you have more than one application writing to the TDQ, the messages are not serialized. It is the responsibility of the invoking programs to serialize themselves.

  • The same set of messages also appear on the system console.

  • The server subtask messages are not written to CKQQ.