How can I get the message from MQ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
brigitta
Participant
Posts: 8
Joined: Tue Dec 18, 2007 9:40 pm

How can I get the message from MQ?

Post by brigitta »

Hi all,

I am new in MQ stage, I want to know how to get the MQ message.
At "column" tab, many options to get MQ message information at field "Data element", e.g. MQ.CORRID, MQ.DATE. But which one is for MQ message content itself?

Many thanks.

Cheers,
Brigitta
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Is this in a server job or in a parallel job?

(You have posted in the server job forum but marked your job type as parallel.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
brigitta
Participant
Posts: 8
Joined: Tue Dec 18, 2007 9:40 pm

Post by brigitta »

Hi Ray,

We will develop in both parallel and server jobs. Any different in getting MQ message content?

Cheers,
Brigitta
sunil_acc
Participant
Posts: 28
Joined: Thu Oct 20, 2005 5:49 am

Post by sunil_acc »

you get 2 colums out of MQ!
1. Invocation ID
2. message!

the message is a whole long stream of message (say 25000 char long). You need to parse that message using some logic. What i have used is a XML stage to parse it and get the data in required format!

try it! :idea:

thanks
suunil
brigitta
Participant
Posts: 8
Joined: Tue Dec 18, 2007 9:40 pm

Post by brigitta »

Hi suunil,

In MQ stage at "column" tab, many options to get MQ message information at field "Data element", e.g. MQ.CORRID, MQ.DATE. But in the list box, which one is for MQ message content itself?

thanks,
Brigitta
sunil_acc
Participant
Posts: 28
Joined: Thu Oct 20, 2005 5:49 am

Post by sunil_acc »

Hi Brigitta,
I dont have the stage installed hence cant provide you the demo job, but as far as i remenber you dont have to give a description for the message (just define the data type and its size).

Moreover, are you reading from the MQ or you are writing to the MQ?

Also it will be good to go through the MQ guide present on the CLIENT DATASTAGE installation directory (usually C:\Program Files\Ascential\DataStage7.5.1\Docs). This will help you a lot, also its pretty small so it wont take much time.

I will still try to look to the stuff you asked for.

Thanks
Sunil
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

As Sunil says, there really are only two columns to concern yourself with.....the message ID, which is there on the output link automatically, and whatever other columns you place on the link......these additional columns function much like the Sequential stage (on Server --- where the Display length is the offset in bytes into the message buffer)...however, the easiest and safest way to get the message is to just add one other column on the output link, like "myMessage"...give it a longvarchar datatype and a length of say.... 5000 and see what you get..... there are options in there for truncation and padding, if the message is shorter or longer.

Ernie
Ernie Ostic

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