This topic contains 4 replies, has 3 voices, and was last updated by 2 months, 1 week ago.

Order of segments affects #MsgIn.DG1

  • I have code that checks for the number of DG1 segments in a message and processes them. I have several sample messages to to confirm it works. One message was OK (found 2 segments) and the other found 0 (there were actually 3)

    Through some troubleshooting, the only difference was the order of the segments.

    If the IN1 segments comes before the DG1s it does not recognize there are any DG1s. If it comes after, it sees them correctly.

    I am not sure where to start troubleshooting the actual cause on this. Clients may send the segments in different orders. I’d rather not spend processing power reordering the message if there is an easier way to fix this.

    Any ideas?

    Steve Ela
    Macro Helix / McKesson
    Software Developer / Integration Lead

    Hi Steve,

    I presume you are counting those segments after they have been parsed, and that the issue is that if an IN1 precedes DG1s, then those segments do not appear at all in the parsed message. (I am trying to distinguish this from some sort of issue just counting.)

    If that is the case, you may need to adjust your VMD definition in Chameleon.

    If you select Message Grammar for any given Message Definition, you will see a list of Segments included in the grammar. There is a checkbox below that says Disregard Segment Order. Once selected, all segments will be parsed regardless of the order they appear.

    Let us know if that addresses the issue.

    Casey Trauer,
    Director, Client Education

    Well, using the ‘Disregard Segment Order’ resolves this. Doh!
    Took me a while to work back to the VMD.

    False Alarm 🙂

    Steve Ela
    Macro Helix / McKesson
    Software Developer / Integration Lead

    Hello Steve! Although ‘Disregard Segment Order’ appears as a swift fix, but real fix is to analyze the Segment Grammar (in respective vmd file) and to customize it to match to your specific real-life messages. ‘Disregard Segment Order’ is powerful but also takes control, over segment grammar check, out of your hands.

    Good point Lev. Problem is, our clients all think their message format is the best.
    Will use it as the quick fit, and look into a more permanent fix down the road.


    Steve Ela
    Macro Helix / McKesson
    Software Developer / Integration Lead

You must be logged in to reply to this topic.