ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Getting NULL values from the Queue.

Post new topic  Reply to topic
 Getting NULL values from the Queue. « View previous topic :: View next topic » 
Author Message
nr_shan
PostPosted: Tue Jan 29, 2008 3:30 am    Post subject: Getting NULL values from the Queue. Reply with quote

Newbie

Joined: 29 Jan 2008
Posts: 6

I have written a simple ESQL/C program to write and read messages from / in a MQ-Local Queue.

I didn’t face any issues in this….But when I tried to write a message in a Remote queue with the same program, still I didn’t see any issues (basically I didn’t recv any errors/exceptions).

After writing the messages in the Remote queue, I tried to read the messages from the destination server using the same Queue (still I didn’t recv any errors/exceptions here too…) but am getting only the NULL-Values.


I don’t know, what are all the options needs to be initialized to Read / Write the message to / from a Remote Queue.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 29, 2008 3:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Write a message to a remote queue (queue remote) like you would write a message to a local queue (queue local).

You can only read (get) a message from a local queue (queue local). That is the queue must be defined as a queue local to the qmgr you are connected to.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jan 29, 2008 4:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

To repeat.

You can only get from a queue that is local to the queue manager you are connected to.

With anything that allows you to run ESQL (this is only Message Broker - perhaps you just meant SQL?), you can only GET from the Broker's queue manager - although there is an MQGetAny support pack.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nr_shan
PostPosted: Tue Jan 29, 2008 4:52 am    Post subject: Reply with quote

Newbie

Joined: 29 Jan 2008
Posts: 6

My sender and receiver programs are running in Server-A(UNIX) and Server-B(MainFrame).
A Remote Queue is configured in Server-A, which is the actual image of the local Queue in Server-B.
Similarly a Remote Queue is configured in Server-B, which is the actual image of the local queue in Server-A.

By sitting in Server-B, using the Cobol-Program (Sender) I can write some messages in the Remote Queue (residing in Server-A).

By sitting in Server-A, using the Receiver program written in ESQL/C I can read the messages from the local queue (msg populated by Sender program @ Server-B), but am getting only the NULL values here...

I hope now you have got the clear picture.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 29, 2008 4:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

NULL values for what?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 29, 2008 5:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
NULL values for what?


And are you certain WMQ is not throwing an error (like a 2033) because you're checking the codes after each call?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nr_shan
PostPosted: Tue Jan 29, 2008 5:23 am    Post subject: Reply with quote

Newbie

Joined: 29 Jan 2008
Posts: 6

The Acutal messages written by Cobol-Sender program from Server-B(MainFrame), can't be viewed or retrieved (only NULL Values) by ESQL/C receiver program in Server-A(UNIX).

There is no Errors/Exceptions during the Message Fetch or MQGET. Even I can see the Queue-Depth count is matching with the number of messages written by Cobol-Program.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 29, 2008 5:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What does a Trace node show for ${Root}?

What parser are you using?

Are you sure your data matches your model?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nr_shan
PostPosted: Tue Jan 29, 2008 7:31 pm    Post subject: Reply with quote

Newbie

Joined: 29 Jan 2008
Posts: 6

I'm using a simple "C" code with MQGET and MQPUT functions.
I just want to know about did I missed out any options to set before executing the MQGET (to read the msg) ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 30, 2008 2:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

nr_shan wrote:
I'm using a simple "C" code with MQGET and MQPUT functions.
I just want to know about did I missed out any options to set before executing the MQGET (to read the msg) ?


If you're not getting any reason or return codes from the MQGET then MQ is returning you a message (see my post above regarding 2033). If it looks like NULL in your application, then there's a code bug either in the receiving or the sending side.

You should also ensure that you got zero codes from the connect and the open calls.

It's also worth reading the messages off with the amqsget sample. If that returns NULLs as well, it proves the problem is at the sending end!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 30, 2008 3:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please show the code that returns null, and the code that Gets the message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Getting NULL values from the Queue.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.