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 » RC = 2194 ;

Post new topic  Reply to topic Goto page Previous  1, 2
 RC = 2194 ; « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Sat Oct 06, 2012 11:25 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

hi, coleagues - thanks for your opinions

mr Saper - in fact, now i see no diference,
and i know nothing about "automatic formating" ...

mr Bruce : what kind of text shall i search for ?
I have had other API problems, where just one TRC file contained
an error code, found by using
type *.trc | find "rc=MQRC"

But in this case, that filter finds lots of files containing RC "2194", both in decimal and also in hex.

So, I am searching for "final" open_options ... OK
I shall continue on Monday, so ... enjoy the weekend !
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Sat Oct 06, 2012 2:38 pm    Post subject: Reply with quote

Poobah

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

sebastia wrote:

I have had other API problems, where just one TRC file contained
an error code, found by using
type *.trc | find "rc=MQRC"

But in this case, that filter finds lots of files containing RC "2194", both in decimal and also in hex.

OK. So you have found the trace files. Edit one of them.

sebastia wrote:
So, I am searching for "final" open_options ... OK
I shall continue on Monday, so ... enjoy the weekend !

I also asked you to post your source code.
_________________
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
sebastia
PostPosted: Tue Oct 09, 2012 10:59 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Hello, again - sorry for the delay - quite a busy week here .. jejeje
mr Bruce : here is my code ... (no pseudo-code but real code ...)

Code:

begin

      move ( MQOD_DEFAULT, msgPtr.od, sizeof (MQOD_DEFAULT) ) ;  // init Object Descriptor fields with default values. source, destination, count.

      msgPtr.od.Version := MQOD_VERSION_3 ;
      msgPtr.od.ObjectType := MQOT_Q_MGR;      // open the queue manager object

      FillChar( msgPtr.od.ObjectQMgrName, MQ_Q_MGR_NAME_LENGTH, $00 ) ;

      FillChar( msgPtr.od.ObjectName, MQ_Q_NAME_LENGTH, $00 ) ;

// Open Options : open to inquiry
      msgPtr.oo := MQOO_INQUIRE + MQOO_FAIL_IF_QUIESCING ;

      Hex_Dump ( Form1.lbEvents, 'OD', @ msgPtr.od, sizeof(MQOD) ) ;
      msgPtr.hOpen := MQ_Open_Queue ( Form1.lbEvents, msgPtr.hConexio, msgPtr.szQMN, msgPtr.od, msgPtr.oo ) ; // hOpen = 0 if error

      if ( msgPtr.hOpen > 0 ) then begin

        debugMsgVerbose ( msgPtr, '++ OpenQmgr() inqQMN OK. oQmgr(' + msgPtr.od.ObjectQMgrName + ').' ) ;

        msgPtr.Selector := MQCA_Q_MGR_NAME ; // Character Attribute

        MQINQ ( msgPtr.hConexio,               // input  : mqconnect handle
                msgPtr.hOpen,                  // input  : from MQOpen() with MQOO_INQUIRE option
                1,                             // input  : selector count
              @ msgPtr.Selector,               // input  : selectors
                0,                             // input  : no integer attributes
                nil,                           // output : integer attributes array
                MQ_Q_MGR_NAME_LENGTH,          // input  : length in bytes of char attributes
              @ msgPtr.Inq_QMN,                // output : char attributes
              @ msgPtr.iInqCC,                 // output : Completion Code
              @ msgPtr.iInqRC ) ;              // output : Reason     Code



At begin of file there is the "headers" file pointer :

Code:

uses
  Windows, Messages, SysUtils,
  Variants, Classes, Graphics,
  Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
  sag_hexdump,                                     // provide pointer and count ...
  MQIC,                                            // CLIENT connection
  mq_basicC ;



And there (MQIC.PAS) we have the link to MQIC32.DLL :

Code:

 procedure MQCONNX( QMgrName:PMQCHAR48; ConnectOpts: PMQCNO; Hconn: PMQHCONN; Compcode,Reason: PMQLONG);cdecl;external 'MQIC32.DLL';

procedure MQINQ  ( Hconn:MQHCONN; HObj: MQHOBJ; SelectorCount: MQLONG; Selectors: PMQLONG; IntAttrCount: MQLONG; IntAttrs: PMQLONG; CharAttrLength: MQLONG; CharAttrs: PMQCHAR; CompCode, Reason: PMQLONG);cdecl;external 'MQIC32.DLL';

Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Wed Oct 10, 2012 10:33 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Today I noticed that, as the error is in mqOpen(), you need that code and not the mqInq() ... Here it is :

Code:

function MQ_Open_Queue ( tLB : TListBox; hCon : THandle; Queue_Name : string ; od : MQOD ; oo : integer ) : THandle ;
var
  cc, rc : integer ;
  hObj  : THandle ;
  szOut : string ; 
   
begin

  strpcopy( od.ObjectName, copy( Queue_Name, 1, sizeof(od.ObjectName)-1) ) ;
 
  MQOPEN ( hCon, @od, oo, @hObj, @cc, @rc ) ;
 
  if ( cc = MQCC_FAILED ) then begin
    hObj := 0 ;
  end ;
     
  result := hObj ;
 
end ; // open()
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Thu Oct 11, 2012 4:59 am    Post subject: Reply with quote

Poobah

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

What open-options did you specify?
_________________
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
sebastia
PostPosted: Thu Oct 11, 2012 6:47 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Open Options = d'8224 or x'2020,
... meaning "Inquire" (0x20) + "Fail If Quiescing" (0x2000).

I have pending to change then a bit (adding "input" maybe)
but I have had a quite busy week, you know ...

Thanks. Sebastian.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ API Support » RC = 2194 ;
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.