Author |
Message
|
bobbee |
Posted: Tue Mar 16, 2010 6:32 am Post subject: .NET and CCDT |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
I amtrying to connectto aQMGR usingthe MQClassesfor .NET. I would like to connectusing the CCDT. I am using the MQQueueManager Method with only the QueueManager name.I have set the MQCHLLIB and MQCHLTAB Environment variables.I am receiving an MQRC_CD_ERROR.I amobviously missing something.The doc in this area is scarse. If this can be done,what am I missing |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 16, 2010 6:52 am Post subject: Re: .NET and CCDT |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bobbee wrote: |
If this can be done,what am I missing |
It can.
Recopy the CCDT from the queue manager. Make sure you have read permissions to the CCDT. Make sure the environment variables are valid in the run time context of your .NET.
Other suggestions equally valid, those are just my top 3.
Read the Clients manual & pretent it's C.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 16, 2010 7:37 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
|
Back to top |
|
 |
bobbee |
Posted: Tue Mar 16, 2010 8:42 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
The error that repeatedly comes up is MQRC_CD_ERROR. I have defined the CCDT and used it via RFHUTIL. It works. I also switched to MQSERVER and tested it via amqsputc. I am still getting that error. I am not .NET/VB but going back to your suggestion. How do you verify that the environment variables are in the developement environment?????????????????
I think this may be the problem.
The developer orig was passing the connectionparameters on the MQQueueManager method. This was working. I set up the MQCHLTAB, MQCHLLIB environment variables (removed the channel paramteres from the call ie MQQueueManager ("QMGRName")) on the OS level and we also tried it via the mqclient.ini Channels stanza. As per the documentation.All of this failed |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 16, 2010 8:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You may need to play with NMQ_MQ_LIB.
Also make sure that MQEnvironment has no properties set on it, and make sure that it's not trying to use a managed connection. |
|
Back to top |
|
 |
bobbee |
Posted: Tue Mar 16, 2010 11:33 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
Ok, here is what I did:
1 - did a msg box on a Environment.GetEnvironmentVariable(MQCHLLIB). This printed out what I had wanted.So I know, just before the MQQueueManager method call the PGM can see the environment variable. Thesevariables alos workwith RFHUTILC.
2 - put in the PGM, just before the call to the MQQueueManager method MQEnvironment.Channel, MQEnvironment.Hostname = ''
3 - set the environment variable NMQ_MQ_LIB=mqic.dll, only the MQ Client is installed on this machine
Still getting the MQRC_CD_ERROR |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Mar 16, 2010 2:28 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Try running a MQ trace. The output usually shows how environment variables and files are processed to resolve connection details. _________________ Glenn |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Mar 16, 2010 4:17 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
bobbee, you perhaps created the channel table at MQ version n, and your client is running MQ version n-1?
Newer clients can always use older channel tables.
Older clients can sometimes run into problems with newer tables if they contain parameters they don't understand.
What does the client's AMQERR01.log say when your app gets this error? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bobbee |
Posted: Wed Mar 17, 2010 5:44 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
Well, I have run a trace and the CCDT was created with MO72 on that machine where the client code is at v7.0.1.1. The lab has asked for the Code and the trace. Waiting my TIME ZONE differences for an answer.This is very strange. I know something is wrong. Would be nice if something actually told me. The detail trace 'looks' slightly useless. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 17, 2010 6:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This is not the first time I've heard of issues with CCDTs created by MO71.
Try using a qmgr to create the CCDT. |
|
Back to top |
|
 |
bobbee |
Posted: Wed Mar 17, 2010 8:48 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
we asked the ADMIN to create one for us.Just to try.But the one we have works fine in RFHUTILC and amqsputc. But I am trying all options right now.Almost to the bottom of the 'well of ideas'. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Mar 19, 2010 12:21 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi Bobbee,
Been there, done that.
Your "*.config" must contain:
Code: |
<configuration>
<appSettings>
<add key="NMQ_MQ_LIB" value="mqic32.dll"/>
</appSettings>
</configuration> |
Your CS .Net code to connect to a queue manager should be:
Code: |
MQQueueManager _qMgr = new MQQueueManager("QMgrName"); |
Make sure you have removed MQSERVER environment, and correctly defined both MQCHLLIB and MQCHLTAB environment variables.
i.e. Windows batch script
Code: |
@echo off
setlocal
set MQSERVER=
set MQCHLLIB=C:\Capitalware\MQAUSX\tables
set MQCHLTAB=MQWT1.TAB
mydotnetapp.exe
endlocal |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
bobbee |
Posted: Sun Mar 21, 2010 1:08 pm Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
known bug, we got a patch, as was configured, everything works now. Thatnks for all the suggestions.
bobbee |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Mar 21, 2010 1:38 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
With MQ? MO71? Dot Net MQ API? |
|
Back to top |
|
 |
Vitor |
Posted: Sun Mar 21, 2010 6:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bobbee wrote: |
we got a patch |
APAR number? Circumstances? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|