Author |
Message
|
sebastia |
Posted: Sat Sep 29, 2012 4:30 pm Post subject: RC = 2194 ; |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hi, dear coleagues.
I am receiving RC=2194 as result of an MQOPEN(),
MQRC_NAME_NOT_VALID_FOR_TYPE
Yes, I am trying to inquiry queue manager name, so I use
od.ObjectType = MQOT_Q_MGR ;
"Messages" book points to blank "ObjetName", but that field is already all blank, 0x20. The instruction doing it is:
FillChar( msgPtr.od.ObjectName, MQ_Q_NAME_LENGTH, Ord(' ') ) ;
I got the code from this thread of yours:
http://www.mqseries.net/phpBB2/viewtopic.php?t=2722&highlight=namelist
... and it runs fine if I use "c" code.
The error comes when I use Delphi.
I am using an improved version of "ma7q", and have lots of running samples, even multi-threaded.
The part I am more in doubt with is Object Descriptor ...
In "c" we init "od" by
MQOD od = { MQOD_DEFAULT } ; /* init Object Descriptor */
In Delphi I have
move ( MQOD_DEFAULT, msgPtr.od, sizeof (MQOD_DEFAULT) ) ;
which looks good to me.
I did try STRMQTRC but I get 40 MB of TRC files I tried to read but failed to understand.
Any clue on how to proceed ?
Any idea what can cause RC=2194 ?
Thanks. Sebastian. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Sep 30, 2012 7:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What happens if you do a field by field compare of the mqod as you are setting it and the default MQOD?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sebastia |
Posted: Sun Sep 30, 2012 10:45 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks, mr Saper - right now (yes, now, sunday evening) I am writing some code in Delphi to "dump" a structure in Hex .... jejeje ... given its initial pointer and length.
More tomorrow ... Sebastian. |
|
Back to top |
|
 |
sebastia |
Posted: Sun Sep 30, 2012 12:43 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hi again, mr Saper
The code runs ok (sample shows Connect_Options structure ...)
Code: |
# Hex Dump. Ptr {0x00F0FE40}, lng {156}.
# Hex Dump. Data {43-4E-4F-20-02-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {10-F7-F0-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
|
Now I have to compare my "Delphi" MQOD to the "c" MQOD ...
More news to come ... |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Sep 30, 2012 1:15 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
sebastia wrote: |
Hi again, mr Saper
The code runs ok (sample shows Connect_Options structure ...)
Code: |
# Hex Dump. Ptr {0x00F0FE40}, lng {156}.
# Hex Dump. Data {43-4E-4F-20-02-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {10-F7-F0-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
# Hex Dump. Data {00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
|
Now I have to compare my "Delphi" MQOD to the "c" MQOD ...
More news to come ... |
Please dump in both hex and character formats. _________________ 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: Sun Sep 30, 2012 1:44 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hey, Bruce - release 1.0 works in hex-only ... jejeje
And there is almost nothing in the structures ...
Object Name is "blank", and Qmgr name also just "blank spaces".
Here we have both OD's : first the good one, then the bad one.
1st problem I see is ... structure length :
When "ok" it is 400 bytes, when "ko" it is 336.
Guess I am missing to set the "version" field.
Do you agree ?
2nd diference : nulls in names or "blank spaces" ...
When "ok" they are both filled of 0x00.
When "ko" they ara filled up with "0x20", blank space.
Any clues ?
Sebastian.
Code: |
+++ OK - Dump (400) chars from (0x0012FD98).
4F-44-20-20-01-00-00-00-05-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-41-4D-51-2E
2A-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
FD-FF-FF-FF-00-00-00-00-00-00-00-00-00-00-00-00
00-00-00-00-FD-FF-FF-FF-00-00-00-00-00-00-00-00
00-00-00-00-00-00-00-00-FD-FF-FF-FF-00-00-00-00
===
--- KO - Hex Dump {OD}. Ptr {0x00C773DC}, lng {336}.
{4F-44-20-20-01-00-00-00-05-00-00-00-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20}.
{20-20-20-20-20-20-20-20-20-20-20-20-41-4D-51-2E}.
{2A-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00}.
|
|
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 01, 2012 12:05 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mmm quite curious ... both are version 1 ...
x'00 : StuctID = "OD.." ;
x'04 : Version = 1 ; // both !!! ???
x'6C : "AMQ.*" ; // DynamicQName
I find the MQOD size shall be d'336 (as in BAD case ...) : see MQOD numbers bellow.
Does somebody know where the length of d'400 can come from ?
Code: |
struct tagMQOD {
MQCHAR4 StrucId ; // in : Structure identifier x'00
MQLONG Version ; // in : Structure version number x'04
MQLONG ObjectType ; // in : Object type x'08
MQCHAR48 ObjectName ; // in/out : Object name x'0C
MQCHAR48 ObjectQMgrName ; // in/out : Object queue manager name x'3C
MQCHAR48 DynamicQName ; // in : Dynamic queue name x'6C
MQCHAR12 AlternateUserId ; // in : Alternate user identifier x'9C
/* Ver:1 */ x'A8
MQLONG RecsPresent ; // in : Number of object records present x'A8
MQLONG KnownDestCount ; // out : Number of local queues opened successfully x'AC
MQLONG UnknownDestCount ; // out : Number of remote queues opened successfully x'B0
MQLONG InvalidDestCount ; // out : Number of queues that failed to open x'B4
MQLONG ObjectRecOffset ; // in : Offset of first object record from start of MQOD x'B8
MQLONG ResponseRecOffset ; // in : Offset of first response record from start of MQOD x'BC
MQPTR ObjectRecPtr ; // in : Address of first object record x'C0
MQPTR ResponseRecPtr ; // in : Address of first response record x'C4
/* Ver:2 */ x'C8 = d'200
MQBYTE40 AlternateSecurityId ; // in : Alternate security identifier x'C8
MQCHAR48 ResolvedQName ; // out : Resolved queue name x'F0
MQCHAR48 ResolvedQMgrName ; // out : Resolved queue manager name x'120
/* Ver:3 */ x'150 = d'336
} ;
|
|
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 01, 2012 12:57 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
I have to say that both executions are on the same machine.
"good" exection is using "c", and d'400 MQOD length comes from sentence
DumpMsg ( (char *) & od, sizeof(MQOD) ) ;
"bad" execution is in Delphi, and d'336 length comes from
Hex_Dump ( 'OD', @ msgPtr.od, sizeof (MQOD) ) ;
MQ Version :
Code: |
C:\>dspmqver
Name: WebSphere MQ
Version: 7.0.1.4
CMVC level: p701-104-110114
BuildType: IKAP - (Production)
|
|
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 01, 2012 3:18 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
well, I have found where the sizeof(MQOD) = 400 comes from ...
In CMQC.H I have
===
/* Structure Length */
#if defined(MQ_64_BIT)
#define MQOD_CURRENT_LENGTH 424
#else
#define MQOD_CURRENT_LENGTH 400 <<<<<<<<<<<<<<<<
#endif
===
And this corresponds to Version 3 of MQOD :
Code: |
struct tagMQOD {
MQCHAR4 StrucId ; // in : Structure identifier x'00
MQLONG Version ; // in : Structure version number x'04
MQLONG ObjectType ; // in : Object type x'08
MQCHAR48 ObjectName ; // in/out : Object name x'0C
MQCHAR48 ObjectQMgrName ; // in/out : Object queue manager name x'3C
MQCHAR48 DynamicQName ; // in : Dynamic queue name x'6C
MQCHAR12 AlternateUserId ; // in : Alternate user identifier x'9C
/* Ver:1 */ x'A8
MQLONG RecsPresent ; // in : Number of object records present x'A8
MQLONG KnownDestCount ; // out : Number of local queues opened successfully x'AC
MQLONG UnknownDestCount ; // out : Number of remote queues opened successfully x'B0
MQLONG InvalidDestCount ; // out : Number of queues that failed to open x'B4
MQLONG ObjectRecOffset ; // in : Offset of first object record from start of MQOD x'B8
MQLONG ResponseRecOffset ; // in : Offset of first response record from start of MQOD x'BC
MQPTR ObjectRecPtr ; // in : Address of first object record x'C0
MQPTR ResponseRecPtr ; // in : Address of first response record x'C4
/* Ver:2 */ x'C8 = d'200
MQBYTE40 AlternateSecurityId ; // in : Alternate security identifier x'C8
MQCHAR48 ResolvedQName ; // out : Resolved queue name x'F0
MQCHAR48 ResolvedQMgrName ; // out : Resolved queue manager name x'120
/* Ver:3 */ x'150
MQCHARV ObjectString ; // Object long name x'150
MQCHARV SelectionString ; // Message Selector x'164
MQCHARV ResObjectString ; // Resolved long object name x'178
MQLONG ResolvedType ; // Alias queue resolved object type x'18C
/* Ver:4 */ x'190 = d'400
} ;
|
|
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 02, 2012 2:22 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Well, I have fixed all I know.
Structure Version is 3, and it has d'400 length.
Code: |
Hex Dump {OD}. Ptr {0x00C773EC}, lng {400}.
4F-44-20-20-03-00-00-00-05-00-00-00-20-20-20-20 [OD ........ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20 [ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20 [ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20 [ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20 [ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-20-20-20-20 [ ]}.
20-20-20-20-20-20-20-20-20-20-20-20-41-4D-51-2E [ AMQ.]}.
2A-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [*...............]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
|
The only remaining diferences are ...
a) 3 pointers at end
b) 2x object names I have "blank" and "ok" sample has 0x00.
Any ideas ?
Sebastian. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 02, 2012 2:45 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Ok, here it is : all looks like "OK case" but error still there .... (and ASCII display also, on version 1.2, jejeje)
OpenOptions here are '8224'
that corresponds perfectly to "C" case where they were 0x2020.
Code: |
{OD}. Ptr {0x00C773EC}, lng {400}.
{4F-44-20-20-03-00-00-00-05-00-00-00-00-00-00-00 [OD ............]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-41-4D-51-2E [............AMQ.]}.
{2A-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [*...............]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{FD-FF-FF-FF-00-00-00-00-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-FD-FF-FF-FF-00-00-00-00-00-00-00-00 [................]}.
{00-00-00-00-00-00-00-00-FD-FF-FF-FF-00-00-00-00 [................]}.
|
Error text :
MQOPEN() Object{MB7QMGR}. oType[5]. oOptions[8224].
CC/RC {2/2194}.
Any ideas ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 03, 2012 8:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
and open options [8224] corresponds to?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sebastia |
Posted: Wed Oct 03, 2012 9:36 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hi, mr Saper. Thanks for your help.
Open Options = d'8224 correspond to x'2020,
meaning "Inquire" (0x20) + "Fail If Quiescing" (0x2000).
Whan I do not understand is why the code works under "c"
(same Open Options !)
but not under "Delphi" ...
as they bot use 'MQIC32.DLL' and 'AMQZSAIC.DLL'
Cheers. Sebastian. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 05, 2012 10:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sebastia wrote: |
Hi, mr Saper. Thanks for your help.
Open Options = d'8224 correspond to x'2020,
meaning "Inquire" (0x20) + "Fail If Quiescing" (0x2000).
Whan I do not understand is why the code works under "c"
(same Open Options !)
but not under "Delphi" ...
as they bot use 'MQIC32.DLL' and 'AMQZSAIC.DLL'
Cheers. Sebastian. |
So what is different between C and Delphi? Maybe the automatic formatting of the destination field?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Oct 06, 2012 9:54 am Post subject: Re: RC = 2194 ; |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
sebastia wrote: |
...
I did try STRMQTRC but I get 40 MB of TRC files I tried to read but failed to understand.
|
Search through the trace looking for how open-options were resolved by MQ. Yes, I know what you specified in your source code. It seems that Delphi is doing some invisible magic.
For fun, try adding other open-options one at a time to see if one corrects the problem.
Also, post your source code here. _________________ 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 |
|
 |
|