Building a message for the CICSRequest node

Create a message definition from a data structure and build a message by using another message flow node.

About this task

You can specify the location in the incoming message tree from which data is retrieved to form the request that is sent by the CICSRequest node. Specify this location by using the Data location Request property on the CICSRequest node. For more information, see Combining a result message with an input message when fetching data from external systems.

Procedure

  1. Find out what data needs to be in the body of the message to send to the CICSRequest node. The message body data must match the input structure that is required for your commarea, as defined in a message set definition based on the language structure. For example; COBOL or C copybook.
  2. Ensure that the Commarea length Basic property value that is configured in the CICSRequest node is large enough to contain the input request data, or the output response data, but that it does not exceed the maximum value of 32767 bytes. If the Commarea length value is not large enough to be used for the response data, or the request data, a memory leak occurs in CICS®. The size of the commarea cannot be changed by the CICS program. If the serialized request data is larger than the Commarea length, the data is truncated to the Commarea length. You can obtain the Commarea length value from the CICS administrator or developer.

Example

The following example shows a message that has been modeled in the MRM domain, which can be received by a CICSRequest node and sent to CICS.

COBOL copybook

This example shows the structure of the data that CICS is expecting. The copybook describes the binary layout of the data that the CICS program expects to receive.

01 DFHAXCS-REQUEST.
   10 AXCS-COMMAND                   PIC S9(9) COMP.
   10 AXCS-FILE                      PIC X(8).
   10 AXCS-RIFLD                     PIC X(6) VALUE SPACES.
   10 AXCS-DATA.
      15 AXCS-STAT                   PIC X(1)  VALUE SPACES.
      15 AXCS-RECID                  PIC X(6)  VALUE SPACES.
      15 AXCS-NAME                   PIC X(20) VALUE SPACES.
      15 AXCS-ADDRESS                PIC X(20) VALUE SPACES.
      15 AXCS-PHONE                  PIC X(8)  VALUE SPACES.
      15 AXCS-DATE                   PIC X(8)  VALUE SPACES.
      15 AXCS-AMOUNT                 PIC X(8)  VALUE SPACES.
      15 AXCS-COMMENT                PIC X(9)  VALUE SPACES.

The example copybook can be used to create a binary structure that requires 98 bytes of COMMAREA or memory space, as shown in the following example:

Table 1.
Name Type and Size
AXCS-COMMAND 4 byte integer (fullword)
AXCS-FILE 8 byte character string
AXCS-RIFLD 6 byte character string
AXCS-STAT 1 byte character string
AXCS-RECID 6 byte character string
AXCS-NAME 20 byte character string
AXCS-ADDRESS 20 byte character string
AXCS-PHONE 8 byte character string
AXCS-DATE 8 byte character string
AXCS-AMOUNT 8 byte character string
AXCS-COMMENT 9 byte character string
Total 98 bytes

The COBOL copybook structure must be imported as a message definition, see Message Sets: Importing from COBOL copybooks for further information, and a message containing such a structure must be passed to the CICSRequest node. A second copybook might be required to map the returning COMMAREA.

What to do next

Process the responses from the CICSRequest, as described in Processing responses from a CICSRequest node.