Running the X12 sample

This topic explains how to put the test messages through the X12 sample message flow.

The input messages

The X12 sample contains the following three test messages.

All three input messages are 850 Purchase Order messages. The first two input messages are valid. The third input message is not valid: the BEG field is missing from the message.

Running the sample

To run the sample, you must put messages on the input queues, and get messages from the output queues. Follow the instructions below:

  1. Put one of the input messages on the X12_TO_XML_IN queue:
    1. In the X12 Message Flows project, double-click one of the enqueue files to open it in the Enqueue editor.
    2. In the Enqueue editor, click Write To queue. The message in the enqueue file is written to the queue.

    When you put a message on the X12_TO_XML_IN queue, the X12_TO_XML_IN MQInput node in the first message flow (called VALIDATINGX122XML.msgflow) parses the message and validates it against the message set:

  2. Get the transformed message from the X12_TO_XML_OUT queue using the Dequeue Message dialog:
    1. Click Get a message from a Queue on the toolbar.
    2. In the Dequeue Message dialog, enter the connection details, and in the Queue name field, type X12_TO_XML_OUT.
    3. Click Read From Queue. The transformed message is displayed in the Dequeue Message dialog. The message is now in XML format.
    4. Click Save As.... Browse to the location where you want to save the message, enter a file name, then click Save.
  3. Put your saved message from step 2 on the XML_TO_X12_IN queue using the Enqueue editor.
    1. Click File > New > Message Enqueue File.
      A new enqueue file is created and opens in the Enqueue editor.
    2. In the Queue manager name field, type WBRK6_DEFAULT_QUEUE_MANAGER.
    3. In the Port field, type 2414.
    4. In the Queue name field, type the name of the desired queue.
    5. Click Browse, then navigate to the location of your saved message from step 2 and click OK.
    6. Click Write To queue.

    When you put the message on the XML_TO_X12_IN queue, the XML_TO_X12_IN MQInput node in the second message flow (called VALIDATINGXML2X12.msgflow) parses the message and validates it against the message set:
  4. Get the message from the XML_TO_X12_OUT queue. The message is now an X12 message.

If there is no message on the X12_TO XML_OUT or XML_TO_X12_OUT queues, see Diagnosing problems.. The message might still be on the input queue, or it might be on the X12_FAIL queue, or on one of the system queues.

The PurchaseOrder_Missing_BEG.enqueue message

When you put the PurchaseOrder_Missing_BEG.enqueue message through the first message flow, the validation on the X12_TO_XML_IN MQInput node fails because the BEG field is missing from the message. The X12_TO_XML_IN MQInput node puts the message on the X12_FAIL queue.

Main Page icon   Back to sample home