Page 1 of 1

How to load XML files to message queue

Posted: Fri May 09, 2008 8:44 am
by bijojames
Hi All
I have created 10 xml files using an XML output stage. I can save this to my system. But i want put those files into a message queue using a Datastage job.
Can i use MQ connector stage after XML out put stage to collect those XMLs created from XML output stage

My data flow like this
Sequential File....>Copy Stage....>XML output Stage....>MQ connector


Somebody plz help me on this

Thanks

Posted: Sat May 10, 2008 3:13 am
by ArndW
Yes, you can use the XML Output stage to feed an MQ Connecter.

Posted: Sat May 10, 2008 1:14 pm
by eostic
Absolutely. You won't be using the "filename" property of the XMLOUtput Stage anymore....simply have an output link with a single large column, like "MyXMLMessage" and put a single '/' in the Description property.

ERnie

Posted: Tue Mar 23, 2010 9:03 am
by Murali4u
Ernie, I have the same issue, have to update a lot of XML files to an MQ. Can you tell the what is the way to write the data in MQ.

Posted: Tue Mar 23, 2010 12:31 pm
by eostic
Play with MQ by itself...be sure you know how to put messages into it....usually as one big column with character data. Test first with a transformer, sendinging something like "hello"....

Then play with XMLOutput...get that working as you need.

Then follow the instructions above for the definition on your output link from xmlOutput.

These can both be very complex stages.....or not...it depends on your situation...but it DEMANDS that you play with each one individually until you fully understand its behavior. Each has its own learning curve. do NOT try to put these together "on the fly" the first time.

Ernie

Posted: Tue Mar 23, 2010 1:02 pm
by eostic
Play with MQ by itself...be sure you know how to put messages into it....usually as one big column with character data. Test first with a transformer, sendinging something like "hello"....

Then play with XMLOutput...get that working as you need.

Then follow the instructions above for the definition on your output link from xmlOutput.

These can both be very complex stages.....or not...it depends on your situation...but it DEMANDS that you play with each one individually until you fully understand its behavior. Each has its own learning curve. do NOT try to put these together "on the fly" the first time.

Ernie

Posted: Wed Jun 09, 2010 5:11 am
by Murali4u
Thanks Ernie. I have loaded the xml file successfully into the MQ.
But I just want to know how to purge the messages in MQ one at a time.

Posted: Wed Jun 09, 2010 6:11 pm
by dsguyok
I was looking at a similar issue just then and looking for help...

I have pre-made XML files on my file system. I want to be able to load the contents of these XML file into messages for the queue (MQ).

Can Sequential File stage just read each file as one record and then use the MQ stage to write those records on to the queue directly?

Is there a need for an XML stage in my case?

Thanks

Posted: Thu Jun 10, 2010 6:07 am
by eostic
No....and in fact, trying to read xml with Seq Stage will potentially get you in trouble. Look thru the forum and check out my blog below for techniques on reading XML as a source.

Provided that the xml documents aren't "huge" you can just load them directly into MQ without any need for the xml stage. Do some searches on that topic too, because at some points, you may need to increase the buffer size available with an APT variable if you are using EE, and/or consider using Server, which is much more liberal in these cases.

Ernie