Help in DataStage's XML and MQSeries capabilities

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Help in DataStage's XML and MQSeries capabilities

Post 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.
Mohsin Khan
Datastage Consultant
abhinavagarwal
Participant
Posts: 26
Joined: Thu Jun 19, 2008 12:39 am
Location: Atlanta

Re: Help in DataStage's XML and MQSeries capabilities

Post 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
- Thanks and Regards,
Abhinav Agarwal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: abhinavagarwal: Reply to topic :!:
Last edited by chulett on Mon Sep 21, 2015 7:00 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Post 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
Mohsin Khan
Datastage Consultant
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
-craig

"You can never have too many knives" -- Logan Nine Fingers
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Post 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.
Mohsin Khan
Datastage Consultant
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
moalik
Participant
Posts: 39
Joined: Thu Sep 15, 2011 8:15 am
Location: Melbourne

Post 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
Mohsin Khan
Datastage Consultant
Post Reply