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
- 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.
- The Field Delimiter and
Array Delimiter parameters
become available.
- 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. - Select Add.
The New Item pop-up panel appears. - 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: - 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: - 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. - 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. - 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.