Defining an ASCII response message for TCP/WMQ

The Transport Map panel allows you to define how you want to process an ASCII delimited response message from a TCP application that you are communicating with. This panel allows you to:

  • Specify the Field Delimiter and Array Delimiter that will be used to parse the response message
  • Define Output map variables
  • Specify how to map parsed response data to the output map variables.

Assumptions

The following is assumed:

  • You have configured a TCP or WMQ transport with options that allow for a response message to be received and processed.

  • You will be communicating with a TCP or WMQ application that is designed to send an ASCII delimited response message.

Procedures

  1. On the Transport Map window, under the From Enterprise tab, select the Format down-arrow, and then select ASCII.

    • The Field Delimiter and Array Delimiter parameters become available.
    • The Field Delimiter parameter is used to separate each ASCII string element in a message.
      The default is a comma. You can specify a different delimiter character, including a space.
    • The Array Delimiter parameter is used to separate items in an array.
      The default is a pipe ( | ) character.
  2. Define the output (or response data) map variables.
    Select the Output tab at the top of the Transport Map window. This tab will only be displayed when the TCP transport that is referenced by this transport map is defined to handle response data.
  3. Select Add.
    The New Item pop-up panel appears.
  4. Fill in the parameters as appropriate for each output map variable that will be parsed from the response data and mapped to a Transaction action output variable.
    For this example, 3 output map variables are defined.
    The first variable, Torque, is a single (scalar) FLOAT4:

  5. Select Add.
    The information for the output map variable is added to the first row on the Output tab.
    Repeat the steps to add the required output map variables to the Output tab. The final Output tab for this example will look similar to this:

  6. Define how these Output tab items get mapped from the response data.
    At the bottom of the To/From Enterprise section, select the From Enterprise tab.
    This tab will only be displayed when the TCP transport that is referenced by this transport map is defined to handle response data.
  7. Select Add.
    The New Item pop-up panel appears.
    Select the output map variable from the Name drop down pick list and specify the position in the response data.
    The positions in the response data start their numbering with zero. The response data is parsed at runtime using the the Field Delimiter and Array Delimiter characters.
    Select Add on the pop-up panel to add the information for the output map variable to the From Enterprise Output tab.

  8. Repeat the steps as necessary to associate all the output map variables with the elements in the response data.
    The completed From Enterprise tab will look similar to this:

    You can now reference the output map variables in a corresponding Transaction action in a trigger, where they can be mapped to local, static or device variables.
Related topics

Creating a transport map with an XSD payload