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 » sample to connect using MQ Server from C# (sharp)

Post new topic  Reply to topic Goto page 1, 2  Next
 sample to connect using MQ Server from C# (sharp) « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Mon Oct 08, 2007 9:01 pm    Post subject: sample to connect using MQ Server from C# (sharp) Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

We need to connect from a machine that has MQ Client
to few remote sites, so we want to use AMQCLCHL.TAB

We are having problems (RC = 2059) from our code in "C#", c-sharp.

Can someone provide a pointer to a sample that shows
how to connect in this environment ?
(MQ client, C sharp, channel table)

The problem is C-sharp does not provide any info in the "Exception" ...

And we are not sure the Options to use ..
Now are trying "MANAGED_CLIENT" ...

Thanks. Seb.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Mon Oct 08, 2007 11:43 pm    Post subject: Reply with quote

Grand High Poobah

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

There's samples available on the install media and the usual places on the web. Seach the forum for "sample code" and you'll get the links.

You might also want to search for discussions on the managed client, of which there have been a few.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Mon Oct 08, 2007 11:54 pm    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I did, Vitor, I did.

And found

>>> http://www.codeproject.com/csharp/csharpmq.asp

which refers to MA7P Support Pack
for Clients and Client Tables ...

and MA7P is GONE from IBM's page !!!

()
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Oct 09, 2007 12:02 am    Post subject: Reply with quote

Grand High Poobah

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

I never said the samples had been updated recently.....

And they're only examples.

(For the record - MA7P is not missing, it's withdrawn)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Oct 09, 2007 12:15 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

OK - Vitor.
I understood the message : "withdrawn", not "removed".

Here is where it can be found :

>>> ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/

Cheers. Seb.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Oct 09, 2007 12:33 am    Post subject: Reply with quote

Grand High Poobah

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

sebastia wrote:
OK - Vitor.
I understood the message : "withdrawn", not "removed".

Here is where it can be found :

>>> ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/

Cheers. Seb.


But why would you want to find it? The contents of the support pac are now base functionality (hence the withdrawal). Using the support pac is at best unnecessary and will at worst cause problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Oct 09, 2007 12:55 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I want it because here

>>> http://www.codeproject.com/csharp/csharpmq.asp

it says there are few samples ...

Do you mean there are C Sharp samples in an IBM base product ?
I will have a look, but ... I think there will be NOT ..

==========================

Literally it says : (which is what I want ...)

Examples of how to use the channel definitions are shown in the sample programs supplied with the .NET Support Pack.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Oct 09, 2007 1:02 am    Post subject: Reply with quote

Grand High Poobah

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

sebastia wrote:
I want it because here

>>> http://www.codeproject.com/csharp/csharpmq.asp

it says there are few samples ...


You have presumably found and discounted other sources of sample code, including (but not limited to) the excellent examples on the Capitalware site (thanks Roger!)?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Oct 09, 2007 2:10 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

No, Vitor - Capitalware samples have not been found by us, yet ...

Any pointer to where to find them ?

Sebastian.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Oct 09, 2007 2:15 am    Post subject: Reply with quote

Grand High Poobah

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

http://www.capitalware.biz/mqseries.html

A valuable resource on all topics MQ, including sample code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Oct 09, 2007 2:37 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Thanks, Vitor - we shall spend some time there, yes !
Back to top
View user's profile Send private message Visit poster's website
rlagares
PostPosted: Wed Oct 10, 2007 7:59 am    Post subject: Capitalware sample code Reply with quote

Newbie

Joined: 09 Oct 2007
Posts: 7

Hello vitor,

I was checking the sample codes of capitalware, and I am using the same code, but I am using the amqmdnet.dll version 1.0.0.3, and my aplicattion is not running.

I readed something about two enviroment variables(MQCHLLIB & MQCHLTAB), and about the MQC.TRANSPORT_MQSERIES_CLIENT property from IBM.WMQ, but I don´t find any documentation about this.

Can someone tell me something about this?, Are these variables necesary?, is this property correctly?

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 10, 2007 8:07 am    Post subject: Reply with quote

Grand High Poobah

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

rlagares wrote:
I readed something about two enviroment variables(MQCHLLIB & MQCHLTAB), and about the MQC.TRANSPORT_MQSERIES_CLIENT property from IBM.WMQ, but I don´t find any documentation about this.


They're documented, quite obviously I think, in the Clients manual, and discussed extensively in the forum.

The property is discussed in the .NET manual (again obviously) and likewise discussed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Wed Oct 10, 2007 3:48 pm    Post subject: C# sample that uses MQCONNX() - we have to use MQCONN()+CCDT Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Good nite !
Can someone tell me ...

( obviously I am quite new to C# )

where in this code is the indication to use MQCONNX() ???

I can improve the question a bit :

WHAT SHALL I CHANGE TO USE MQCONN() and AMQCLCHL.TAB ?

Seb, still learning !

=============================================

Hashtable connectionProperties = new Hashtable();

String connectionType = MQC.TRANSPORT_MQSERIES_CLIENT;

// Add the connection type

connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType);

connectionProperties.Add(MQC.HOST_NAME_PROPERTY, " ");

connectionProperties.Add(MQC.CHANNEL_PROPERTY, " ");

// Set up the rest of the connection properties, based on the
// connection type requested

_oQueueManager = new MQQueueManager(" ", connectionProperties);

=============================================
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Oct 10, 2007 10:57 pm    Post subject: Reply with quote

Grand High Poobah

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

The .NET manual didn't help then? Not even the part titled "Defining which connection type to use"?

May I respectfully suggest that, as a newcommer to C#, you get your feet wet (or wetter) with the language before attempting to navigate an admittedly not straightforward interface?

This forum's not the ideal place or method for training.
_________________
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 Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » sample to connect using MQ Server from C# (sharp)
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.