How to load XML files to message queue

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
bijojames
Participant
Posts: 12
Joined: Wed Nov 28, 2007 10:27 pm
Location: THANE

How to load XML files to message queue

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes, you can use the XML Output stage to feed an MQ Connecter.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

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

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Murali4u
Participant
Posts: 37
Joined: Sun Feb 21, 2010 12:27 pm

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

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

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

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

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Murali4u
Participant
Posts: 37
Joined: Sun Feb 21, 2010 12:27 pm

Post 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.
Rockzz Tech
dsguyok
Premium Member
Premium Member
Posts: 24
Joined: Thu Jan 21, 2010 10:22 pm

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

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

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply