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 » MQSeries.NET package

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7
 MQSeries.NET package « View previous topic :: View next topic » 
Author Message
crayon_coco
PostPosted: Sun Oct 12, 2003 6:13 pm    Post subject: any configuration from client side? Reply with quote

Apprentice

Joined: 08 Oct 2003
Posts: 33

thanks for the help! will try that again but i have some question here

i am intalling the mqclient to my win2K server and will connect to the mqserver which is a as/400 machine
after intsalling the mq series client on my app server do i need to do any configuration such as defining the connection (the TCP/IP of the mq server i am connection to, the qmanager name etc)? or all these is done in my c# program
i tried to run the amqsputc command run the client machine and keep getting the 2035 return code. what is the reason?
thanks a million!
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Tue Oct 14, 2003 5:04 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

I would make sure you can communicate with the other MQ server before trying to solve it in code.

Try using the PostCards applet; this will allow you to send messages to other queues and verify connectivity.

Also, check out the Quick Beginnings guide for setup.

HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
mhunter
PostPosted: Thu Jan 22, 2004 5:59 pm    Post subject: Change CharacterPageset using MQSeries.net Reply with quote

Newbie

Joined: 22 Jan 2004
Posts: 3

How do I get this message encoded so that it can be read on the mainframe in a windows MQ to Mainframe scenario and then encoded from ebcdic back to Ascii on the reponse?

private bool SendRequest(string requestToSend)
{
bool success = false;
try
{
Debug.WriteLine("Request send to MQ started");
qMgr = new MQQueueManager(qMgrName);
//qMgr.CharacterSet
//Get the Request and Response Queues
requestQueue = qMgr.AccessQueue(requestQName, MQC.MQOO_OUTPUT);
responseQueue = qMgr.AccessQueue(responseQName, MQC.MQOO_INPUT_AS_Q_DEF);
string line;
line = requestToSend.Trim();
if (line.Length > 0)
{
MQMessage message = new MQMessage();
MQMessage requestMessage = new MQMessage();
requestMessage.WriteString(line);
//Specify a "request" type message
requestMessage.MessageType = MQC.MQMT_REQUEST;
//Set a correlation id so we can watch for the response
requestMessage.Report = MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
//Set the response queue
requestMessage.ReplyToQName = responseQName;
//Send the request
requestQueue.Put(requestMessage);
sendSuccess = true;
Debug.WriteLine("Request sent, waiting for response ...");
//Set up the Response object
MQMessage responseMessage = new MQMessage();
responseMessage.CorrelId = requestMessage.MsgId;
//Set the request retrieval options
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.Options = MQC.MQGMO_WAIT;
//Here set the number of seconds for the wait interval
//before the MQISA request timeout.
gmo.WaitInterval = timeout * 1000;
gmo.MatchOptions = MQC.MQMO_MATCH_CORREL_ID;
//Retrieve the response and catch any timeout error
//Get the Response passing in the options to use
responseQueue.Get(responseMessage, gmo);
line = responseMessage.ReadString(responseMessage.MessageLength);
Debug.WriteLine("Response: {0}", line);
responseContent = line;
getSuccess = true;
//responseQueue.Close();
//qMgr.Disconnect();

success = true;
}//Check if we have data in the "line" / message
}
finally
{
//cleanup as needed
requestQueue.Close();
qMgr.Disconnect();
}
return success;
}
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Fri Jan 23, 2004 5:43 am    Post subject: Re: Change CharacterPageset using MQSeries.net Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mhunter wrote:
How do I get this message encoded so that it can be read on the mainframe in a windows MQ to Mainframe scenario and then encoded from ebcdic back to Ascii on the reponse?


You add the CONVERT option to both GETs (the one on the mainframe and the one in your .NET code). And set the Format of the message in both directions to MQFMT_STRING.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mhunter
PostPosted: Mon Jan 26, 2004 5:59 pm    Post subject: Re: Change CharacterPageset using MQSeries.net Reply with quote

Newbie

Joined: 22 Jan 2004
Posts: 3

JeffLowrey wrote:
mhunter wrote:
How do I get this message encoded so that it can be read on the mainframe in a windows MQ to Mainframe scenario and then encoded from ebcdic back to Ascii on the reponse?


You add the CONVERT option to both GETs (the one on the mainframe and the one in your .NET code). And set the Format of the message in both directions to MQFMT_STRING.


Thanks Jeff. I had pretty much concluded that after some trying.

Since you've been kind enough to respond let me ask a few other related questions, short and hopefully sweet though:

Is is true then that if the message is not set to string when it is PUT to the queue that the receiver cannot convert it after it is put on the Queue (short of some custom conversion routine)?

Also I'm using MQ.dll from MQSeries.Net before it apparently was picked up by IBM (didn't know any better). I don't see any property for "characterset" on the Message object. It is referred to in many posts I see. So How would I set the characterset property programatically?

Finally when do I need to use the "encoding" property vs. setting the characterset.

Thanks again
Back to top
View user's profile Send private message MSN Messenger
JasonE
PostPosted: Tue Jan 27, 2004 1:42 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Quote:
Is is true then that if the message is not set to string when it is PUT to the queue that the receiver cannot convert it after it is put on the Queue (short of some custom conversion routine)?

Yes, something has to tell MQ what format the user data is in if you want it converted. Otherwise its a set of bytes, which could be a picture, voice message or document!

Quote:
Also I'm using MQ.dll from MQSeries.Net before it apparently was picked up by IBM (didn't know any better). I don't see any property for "characterset" on the Message object. It is referred to in many posts I see. So How would I set the characterset property programatically?

Pass - Install 5.3 csd05 and use that version. Its got many changes over the support pack (ma7p) version, which again is very different from any prior version. There is no point going for versions which are very back level.

Quote:
Finally when do I need to use the "encoding" property vs. setting the characterset.

Encoding is generally for big vs little-endianess, CCSID is for character conversion.
Back to top
View user's profile Send private message
mhunter
PostPosted: Wed Jan 28, 2004 8:31 am    Post subject: Reply with quote

Newbie

Joined: 22 Jan 2004
Posts: 3

Quote:
Pass - Install 5.3 csd05 and use that version. Its got many changes over the support pack (ma7p) version, which again is very different from any prior version. There is no point going for versions which are very back level.


I'll upgrade, we are converting in channel right now. Maybe the upgrade will get the "get with convert" option working.

Thanks.
Back to top
View user's profile Send private message MSN Messenger
simon.starkie
PostPosted: Tue Feb 03, 2004 10:33 am    Post subject: Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

Thanks for providing this for us all Neil.
Back to top
View user's profile Send private message
dotnet=dontnet
PostPosted: Tue Apr 05, 2005 1:28 pm    Post subject: Reply with quote

Newbie

Joined: 05 Apr 2005
Posts: 4

I am having very hard time with remoting connection by using
MQQueueManager qMgr = new MQQueueManager(qMgrName, Channel, ConnName ) with C#, where I must specify the host and the port.

Anyone who has a sample here

Manks a lot
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Apr 05, 2005 1:58 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Use MQEnvironment class and specify the values there.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JasonE
PostPosted: Wed Apr 06, 2005 12:37 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Look at the c# samples (mqm\tools\dotnet\samples\cs) and see how nmqsget.cs does it for example.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7 Page 7 of 7

MQSeries.net Forum Index » IBM MQ API Support » MQSeries.NET package
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.