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 IndexIBM MQ Installation/Configuration SupportI need help

Post new topicReply to topic Goto page 1, 2  Next
I need help View previous topic :: View next topic
Author Message
JohnRaver
PostPosted: Fri Oct 19, 2001 3:37 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

Can anyone help me?

I am trying to write a Powerbuilder application and I am coming across a couple issues with MQ.

1) How do I connect to a remote queue, my local queue connection is find, but I get an error when I try a remote queue.

2) I need to determine how many messages are on the queue before I do a get

3) How do I set syncpoints?

I hope someone out there can help me, I have little experience with MQ and would greatly appreciate the help.
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Oct 19, 2001 6:58 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Can you add some details on PowerBuilder. I personally have no experience with such. What programming language is used?
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Fri Oct 19, 2001 8:55 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

The application itself is in the computer language powerbuilder. It is an Object Oriented language. I am creating OLE object that are going to be doing the work for me, but when I go to connect to the OLE object it is blowing me out of my program. Here is some sample code:

ole_mq_queue_mgr = ole_mq_session.AccessQueueManager(is_queuemgr)

This is the line of code that is not working for connecting to the remote queue.
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Oct 19, 2001 9:40 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I think the following FAQ entry
http://www.mqseries.net/phpBB/viewtopic.php?topic=348&forum=16&0 will answer the question of why it works for local queue managers but not for remote.
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Fri Oct 19, 2001 9:45 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

I am not really trying to connect to a remote queue manager, I am connecting to my local manager, once the message is put on that queue it gets send (behind the scenes) to another queue on another manager. The queue manager for the queue that is giving me problems is the same as the other queues that I can connect to.
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Oct 19, 2001 9:59 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

What is the nature of the error reported?
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Fri Oct 19, 2001 10:04 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

It is an error that says null Object Reference, saing that the object is not there. I created the object using the following code (queue and manager):

// Queue Manager - To represent a connection to a queue manager.
ole_mq_queue_mgr = CREATE oleobject
ll_Ret = ole_mq_queue_mgr.ConnectToNewObject("MQAX200.MQQueueManager")
if ll_Ret <> 0 then

dw_header.object.as_activity[1] = ls_Activity + "~r~n" + "Encountered error connecting to MQQueueManager object with return: " + String(ll_Ret)
of_cleanup()
return -1
end if

// Queue - To represent an MQSeries queue.
ole_mq_queue = CREATE oleobject
ll_Ret = ole_mq_queue.ConnectToNewObject("MQAX200.MQQueue")
if ll_Ret <> 0 then

dw_header.object.as_activity[1] = ls_Activity + "~r~n" + "Encountered error connecting to MQQueue object with return: " + String(ll_Ret)
of_cleanup()
return -1
end if
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Oct 19, 2001 11:05 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

... hmmm ... one doesn't normally create an MQQueue object, one normally accesses an MQQueue object (gets a reference to one) from the MQQueueManager object. Which exact statement failed?
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Fri Oct 19, 2001 12:32 pm Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

THe line that failed was this
ole_mq_queue_mgr = ole_mq_session.AccessQueueManager(is_queuemgr)

This line is in my connect function, those lines before were in the function to create the messages. How would I go about getting a reference through the queue manager. Like i said before I really don't know to much about MQ.

What exactly do you do for a living?
Back to top
View user's profile Send private message Send e-mail
JohnRaver
PostPosted: Fri Oct 19, 2001 12:32 pm Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

THe line that failed was this
ole_mq_queue_mgr = ole_mq_session.AccessQueueManager(is_queuemgr)

This line is in my connect function, those lines before were in the function to create the OLE objects. How would I go about getting a reference through the queue manager. Like i said before I really don't know to much about MQ.

What exactly do you do for a living?
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Oct 19, 2001 1:05 pm Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

The line you list doesn't appear in the code fragment you supplied.

The following link from the MQSeries COM book illustrates the properties and methods on the MQQueueManager object. One of the methods is AccessQueue which returns an MQQueue object owned by the queue manager.
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Mon Oct 22, 2001 3:27 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

Thanks for that web site, I am going to look around and see if I can get anything from that. I was wondering if you knew anything about creating sync point (unit of work). Also, I need a way to determine the amount of messages on a queue before I do a get on the queue.

Any help on those?
Back to top
View user's profile Send private message Send e-mail
JohnRaver
PostPosted: Mon Oct 22, 2001 3:43 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

To go with the other message I posted, see above...

I think I am already using the AccessQueue Method.

Here is my code:

ole_mq_queue_mgr = ole_mq_session.AccessQueueManager(is_queuemgr)

ole_mq_queue = ole_mq_queue_mgr.AccessQueue(is_queue, 16 + 1)

The error that I am getting is on the AccessQueueManager, I guess I am trying to access the queue through the session.

Does this help any?
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Mon Oct 22, 2001 7:27 pm Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

What is the value of the variable being passed to the AccessQueueManager()? Is it the exact same case as the local queue manager? Is the queue manager located on the same machine as the application? Does the IBM supplied binary amqsput work to put a message to a test queue?
Back to top
View user's profile Send private message
JohnRaver
PostPosted: Tue Oct 23, 2001 3:11 am Post subject: Reply with quote

Novice

Joined: 17 Oct 2001
Posts: 14

What is the value of the variable being passed to the AccessQueueManager()?

The value I am passing is the name os the queue manager.


Is it the exact same case as the local queue manager?

Yes


Is the queue manager located on the same machine as the application?

No


Does the IBM supplied binary amqsput work to put a message to a test queue?

I am not sure if it does or not, I would need to investigate, what is amqsput?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexIBM MQ Installation/Configuration SupportI need help
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.