Page 1 of 1

Help in DataStage's XML and MQSeries capabilities

Posted: Thu Sep 17, 2015 9:07 pm
by moalik
Hi All,

I am new to XML's and MQConnector's in Datastage.

We have a library of XML services. Our requirement is to map relational data into an XML structure, place it on a queue, then read the response from the queue and decode the received XML message.

I went through IBM Documentation regarding the XML Stage and got some knowledge on the XML generation. But i am mainly concerned on how to Pass the XML file to the Queue, Read the response from the Queue and decode the XML Message.

I am expecting my design would be something like:

Library Files -> XML Stage -> MQConnector Stage(to read the XML Generated from the XML Stage).

No idea about the response from MQConnector and decoding the message.

Could anyone would help me with a solution like how can we implement this?

Any documentation and existing design structure would be a real help.

Thanks in Advance.

Re: Help in DataStage's XML and MQSeries capabilities

Posted: Fri Sep 18, 2015 11:40 am
by abhinavagarwal
Hi Mohsin


for MQ, you may want to read from documentation of MQ itself that should give you a fair idea on how-to, what-to etc...
while for XML you can read on these, just to avoid re-writing everything here, giving you pointers, use following links -

http://pr3systems.com/blog/information- ... -xml-pack/

http://etlimpact.blogspot.com/2012/08/r ... using.html

http://it.toolbox.com/wiki/index.php/Lo ... rallel_job

Even DS documentation is also very comprehensive on XML, you may want to try that as well.

Best regards

Posted: Fri Sep 18, 2015 12:10 pm
by chulett
:!: abhinavagarwal: Reply to topic :!:

Posted: Mon Sep 21, 2015 12:46 am
by moalik
Hi Abhinav,

Sorry for the delayed reply.

Thanks for sharing the Links. It was really helpful.

I have generated the XML files and pass then on the queue and it was successful. But I am unable to figure out how to read the response from the queue and decrypt the XML File.

Hi Craig,

I Couldn't reply to the topic because i haven't been notified when the reply is posted for my topic.

Instead of waiting for the mail, i would open up my topic and check for the replies from the next time.

Thanks

Posted: Mon Sep 21, 2015 3:45 am
by eostic
Reading from MQ is not a whole lot different than writing to MQ and in some ways, is simpler. As noted above, the documentation is very detailed about the MQ Connector. Start with one single column that pics up the "whole" message --- there are more complicated options, and abilities to get metadata from the MQ Descriptor, and tricks for leaving the Job on "always".

One of the most important considerations when first testing the MQ Connector and learning how it works is be SURE TO CHANGE THE DEFAULTS for the wait time and the number of messages to process.....these values start at -1, which means "infinite"....... that will create all kinds of issues when testing.....so....for development, set the wait time to something small like 10 or 30 seconds, and set the number of messages to 10.

Ernie

Posted: Mon Sep 21, 2015 7:03 am
by chulett
moalik wrote:I Couldn't reply to the topic because i haven't been notified when the reply is posted for my topic.

Instead of waiting for the mail, i would open up my topic and check for the replies from the next time.
Hey, sorry - that post wasn't meant for you but was for "abhinavagarwal" immediately above who is a serial quoter. :wink: Edited my post to make that more clear. Please feel free to wait for the mail or come back and check, no worries either way. And while you're here, see if there's a topic you can help on! :D

Posted: Mon Sep 21, 2015 11:56 pm
by moalik
Hi Ernie,

Thanks for the quick reply :)

I went through the MQConnector documentation and tried reading from the Queue with testdata. I was able to retrieve the data to Peak Stage.

I couldn't find anything related to reading a response from the Queue and then then read the data from the queue based on the MQ response.

Thanks.

Posted: Tue Sep 22, 2015 4:15 am
by eostic
I have not seen a use case that "truly" required it, and only ever tested this in beta/QA when the Connector first came out many years ago, but you can run the MQ Connector in request/reply mode by using an input link AND an output link. Not sure that will fit with your use case, but it is documented.

Ernie

Posted: Sun Sep 27, 2015 6:35 pm
by moalik
Hi All,

Our requirement has changed we are no longer looking for response from MQ.

I have got lot of help for the mentioned topic and had a good hands on experience with XML Transformations and MQConnector.

I am marking this topic as resolved. :D

Thanks