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 » Call to MQI MQCONN fails

Post new topic  Reply to topic
 Call to MQI MQCONN fails « View previous topic :: View next topic » 
Author Message
NewYa3am
PostPosted: Mon Jan 04, 2010 9:29 am    Post subject: Call to MQI MQCONN fails Reply with quote

Newbie

Joined: 14 Oct 2009
Posts: 8

Hello,

I'm using this http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24007060&loc=en_US&cs=utf-8&lang=en SupportPac that implements the WebSphere MQI as a Pascal unit for Borland's Delphi.

My development platform contains:
-Windows XP
-Embarcadero Delphi 2010
-WebSphere MQ V6.0.0

The code I've written is just simple and straight forward. Here is my first Delphi code:

Code:

unit Unit1;

interface

  uses MQI;

  procedure run;

implementation

  procedure run;
  var
    Hconn : MQHCONN;
    ConnectOpts : MQCNO;
    CompCode, Reason : MQLONG;
    QMgrName : MQCHAR48;

  begin

    QMgrName := 'QMGR_1'#0;

    MQCONN ( @QMgrName, @HConn, @Compcode, @Reason );

    writeln( 'Completion Code: ' , CompCode , ', Reason: ' , Reason );
    if CompCode <> MQCC_OK then
      writeln( 'failed to connect' )
    else
      writeln( 'connected' );

   end;

end.


and that's the result I get
Code:
Completion Code: 2, Reason: 2058
failed to connect


Which means there is an error in the queue manager name but I've made sure that the name is absolutely correct. I've tried to use blanks as the name of the queue manager but I get the reason code 2059 which implies the default queue manager is not available.

I've made a call through the Java implementation and it worked fine.

Any help, please.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jan 04, 2010 10:08 am    Post subject: Re: Call to MQI MQCONN fails Reply with quote

Grand High Poobah

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

NewYa3am wrote:
the result I get
Code:
Completion Code: 2, Reason: 2058
failed to connect


Which means there is an error in the queue manager name but I've made sure that the name is absolutely correct.


It might be right in your code, but is it right in the CCDT?

NewYa3am wrote:
I've tried to use blanks as the name of the queue manager but I get the reason code 2059 which implies the default queue manager is not available.


No it doesn't. It implies the queue managers in the CCDT (which may or may not be the default) are unavailable, which might simply mean unreachable from where your code is running.

Use the usual techniques for resolving a 2059. You'll find your piece of working Java an invaluable aid here.
_________________
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 » Call to MQI MQCONN fails
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.