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 » IBM MQ API Support » MQ Client and VB6

Post new topic  Reply to topic
 MQ Client and VB6 « View previous topic :: View next topic » 
Author Message
RayC
PostPosted: Tue Aug 24, 2010 6:02 am    Post subject: MQ Client and VB6 Reply with quote

Newbie

Joined: 19 Aug 2010
Posts: 3

For about a couple of years now, we've been using a VB6 application to connect to MQ Server, and it's been working

fine. Both the VB6 app and the queue manager were on the same server called SQLPRD2.

Recently, we needed to move the queue manager to another server (AS400) and install MQ Client on SQLPRD2. Now we need

to tell our VB6 app to use MQ Client to fetch the messages from the queue mananger on the AS400.

The IBM documentation says to simply recompile the application by changing the conditional compilation to MqType=2.

Secondly, we changed the usual parameters such as the MQ server name, port, channel etc. Now when we run it, we keep

getting the 2058 error saying it cannot connect to the queue manager.

So we decided to test it by hard-coding some information.
Here is a portion of the VB6 code we're trying to test, but this gives error code 2058:

Dim lngQueueManagerCH As Long

MQCNOCD_DEFAULTS co
co.ChannelDef.ChannelName = "SYSTEM.DEF.SVRCONN"
co.ChannelDef.ConnectionName = "99.9.9.9(1484)"
co.ConnectOpts.ClientConnOffset = 188

MQCONNXAny "MCMQMD1", co, ConnectionQM, lngCompCode, lngReason


Where 99.9.9.9 is the IP address of the AS400.
1484 is the port number.
MCMQMD1 is the queue manager name.

Can anyone tell me what we're doing wrong?

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 24, 2010 6:09 am    Post subject: Re: MQ Client and VB6 Reply with quote

Grand High Poobah

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

RayC wrote:
co.ConnectOpts.ClientConnOffset = 188


Why this?

If you're sure you want to do this, are you sure this value is correct?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Aug 24, 2010 6:10 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9470
Location: US: west coast, almost. Otherwise, enroute.

Any errors logged on the as/400?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
RayC
PostPosted: Tue Aug 24, 2010 6:12 am    Post subject: Reply with quote

Newbie

Joined: 19 Aug 2010
Posts: 3

Originally, I did not have that line at all. But I found some samples online that had similar problems to ours, and for them, adding this line worked.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 24, 2010 6:46 am    Post subject: Reply with quote

Grand High Poobah

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

RayC wrote:
Originally, I did not have that line at all. But I found some samples online that had similar problems to ours, and for them, adding this line worked.


I suspect you'll need to code the additional construct that offset identifies & change the offset you use accordingly.

As well as the suggestion of my worthy associate, I'd try setting up a tab file & using MQCONN rather than MQCONNX. It'd be interesting (to me at least) to see if that yields the same error.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Aug 24, 2010 4:27 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Is the qmgr listening on the host / port actually named "MCMQMD1" ?

Have you tested the connection? eg.

amqscnxc -x 99.9.9.9(1484) -c SYSTEM.DEF.SVRCONN MQMQMD1

or

set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/99.9.9.9(1484)
amqsputc YOUR.QL.NAME MCMQMD1
_________________
Glenn
Back to top
View user's profile Send private message
RayC
PostPosted: Wed Aug 25, 2010 4:44 am    Post subject: Reply with quote

Newbie

Joined: 19 Aug 2010
Posts: 3

Strangely enough, when I test it using:

amqscnxc -x 99.9.9.9(1484) -c SYSTEM.DEF.SVRCONN MCMQMD1

I get reason code 2035.
I think this has to do with security.

Here's what's even stranger. I explained the fact that I cannot connect to the queue manager to another developer here who also uses it, and he says his java application does not require a user name or password. He told me he leaves both null, yet his java application connects to the queue manager.

Can someone explain why his java app requires no user name or password? Yet, when I supply no user name or password with my VB app I get reason code 2035. I know for a fact that my VB application runs under a specific account on the server. I asked to have this account added to the server where the queue manager exists (as400) but the admins don't want to do that because they tell me to do like the java developer, where no new account is needed.

Can someone kindly explain why the java app requires no credentials? Yet my VB app gets reason code 2035.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 25, 2010 4:47 am    Post subject: Reply with quote

Grand High Poobah

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

RayC wrote:
Can someone kindly explain why the java app requires no credentials? Yet my VB app gets reason code 2035.


There's a known "feature" with java that's been discussed many, many times on this forum. Because your queue mananger is improperly secured (i.e. using default settings) his Java app is getting administrative authority from a blank user id.

10 minutes with the search facility will turn up a wealth of threads.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Wed Aug 25, 2010 4:50 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 25, 2010 4:49 am    Post subject: Reply with quote

Grand High Poobah

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

RayC wrote:
Strangely enough, when I test it using:

amqscnxc -x 99.9.9.9(1484) -c SYSTEM.DEF.SVRCONN MCMQMD1

I get reason code 2035.


So this proves client connection to that queue manager is possible (because the queue manager is returning the security error) which pins the blame firmly on your MQCONNX call.

I repeat my advice to try a normal MQCONN & see what happens.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » IBM MQ API Support » MQ Client and VB6
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.