|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
RC = 2194 ; |
« View previous topic :: View next topic » |
Author |
Message
|
sebastia |
Posted: Sat Oct 06, 2012 11:25 am Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Sat Oct 06, 2012 2:38 pm Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Tue Oct 09, 2012 10:59 pm Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Wed Oct 10, 2012 10:33 pm Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Thu Oct 11, 2012 4:59 am Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Thu Oct 11, 2012 6:47 am Post subject: |
|
|
 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 |
|
 |
|
|
|
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
|
|
|
|