ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reverse construct input CSV

Post new topic  Reply to topic
 Reverse construct input CSV « View previous topic :: View next topic » 
Author Message
capellano
PostPosted: Sat Mar 13, 2021 7:50 am    Post subject: Reverse construct input CSV Reply with quote

Newbie

Joined: 13 Mar 2021
Posts: 3

Hello,

I have a message set within which there is a message definition. However an example of what the CSV looks like cannot be found. I have sent several CSV files through the message flow but the elements aren't all being picked up under the message assembly.

Is there a way to derive from the definition what the format of the CSV should be?

There is an mxsd file which I attach to this message. What else should I look for?

Code:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:complexType name="Emp">
    <xsd:annotation>
      <xsd:appinfo source="WMQI_APPINFO">
        <tdsStructRep delimiter="@" messageSetDefaultRep="Text_CSV"/>
      </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Ename" type="xsd:string"/>
      <xsd:element name="Eid" type="xsd:int"/>
      <xsd:element name="Esal" type="xsd:string"/>
      <xsd:element name="Ecountry" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
    <xsd:complexType name="complexType">
    <xsd:sequence/>
  </xsd:complexType>
    <xsd:element name="IN" type="Emp">
    <xsd:annotation>
      <xsd:appinfo source="WMQI_APPINFO">
        <MRMessage messageDefinition="/0/IN;XSDElementDeclaration$MRObject"/>
      </xsd:appinfo>
    </xsd:annotation>
  </xsd:element>
</xsd:schema>


Last edited by capellano on Sat Mar 13, 2021 1:36 pm; edited 2 times in total
Back to top
View user's profile Send private message
capellano
PostPosted: Sat Mar 13, 2021 1:35 pm    Post subject: Reply with quote

Newbie

Joined: 13 Mar 2021
Posts: 3

Hello,
I opened the messageSet.mset using the message set editor. If you click on the Text_CSV then look under the Data Element separation settings it suggests the delimiter is a comma. But when I run the flow in debug mode it does not pick up the Elements (Eid, Esal & Ecountry). I sent this message to the flow Name,123,54000,UK.

Eventually I found the correct format of CSV file that fits the message definition. But only after I opened the message definition CSV_mdef.mxsd in text editor. Then I could see this line:

<tdsStructRep delimiter="@" messageSetDefaultRep="Text_CSV"/>

I think it is funny that when I open the message definition CSV_mdef.mxsd using the Message Definition Editor GUI the @ delimiter is nowhere to be seen.

Now I am sending Amit@123@54000@UK

Which produces:

<Emp><Ename>Amit</Ename><Eid>123</Eid><Esclor>54000</Esclor><Ecountry>UK

This is what I expected.

Do you think this is the best way to determine the correct input message?

Amit
Back to top
View user's profile Send private message
timber
PostPosted: Sun Mar 14, 2021 12:21 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Disclaimer: It's a very long time since I worked on MRM, so there may be simple answer that I'm missing.
Quote:
I opened the messageSet.mset using the message set editor. If you click on the Text_CSV then look under the Data Element separation settings it suggests the delimiter is a comma.
I agree with your expectation - if it displays the Delimiter property as a comma then it should use a comma when parsing.
Quote:
I think it is funny that when I open the message definition CSV_mdef.mxsd using the Message Definition Editor GUI the @ delimiter is nowhere to be seen.
I agree.
Quote:
Do you think this is the best way to determine the correct input message?
Well, I don't blame you for asking the question, but it's not really a reliable way to determine the correct input message. The only reliable method is to ask the sender to supply some example messages.

The problem with your current approach is that either of the following may be the case:
a) The correct delimiter is @. The Message Set editor is broken (possibly displaying the default delimiter from the .mset file ?)
or
b) the correct delimiter is comma, but the message set compiler is suffering from the same defect as the message set editor.

Unless somebody from IBM turns up to give you a definitive answer, I think I would open a ticket with IBM to get an official answer.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reverse construct input CSV
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.