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 » Error 2142 when coding in C# from Windows NT box

Post new topic  Reply to topic
 Error 2142 when coding in C# from Windows NT box « View previous topic :: View next topic » 
Author Message
laksdeep
PostPosted: Thu Sep 15, 2005 8:15 am    Post subject: Error 2142 when coding in C# from Windows NT box Reply with quote

Newbie

Joined: 15 Sep 2005
Posts: 2

Hi all,
I want to put messages to MQ on Mainfram from Windows NT box using C#. When I put the messages I am getting the following error
"CSQC746E Invalid CCSID, 500 expected, 1200 received"

Here is my code :

MQQueue mqQueue = mqQManager.AccessQueue(queueName, openOptions);
MQMessage mqMessage = new MQMessage();
mqMessage.ReplyToQueueManagerName = replyQueueManager;
mqMessage.ReplyToQueueName = replyQueueName;
mqMessage.Version = MQC.MQMD_VERSION_2;
mqMessage.Format = MQC.MQFMT_CICS;
mqMessage.CorrelationId = StringToByteArray("AMQ!NEW_SESSION_CORRELID");
mqMessage.MessageType = MQC.MQMT_DATAGRAM;
mqMessage.MessageId = AsciiToEbcdicArray(messageID);
mqMessage.UserId = userId;
mqMessage.CharacterSet = MQC.MQCCSI_Q_MGR;
//mqMessage.CharacterSet = 500; MQQueueManger.CharacterSet is 437


Any help is appreciated.

Thanks,
Pradeep
Back to top
View user's profile Send private message
laksdeep
PostPosted: Thu Sep 15, 2005 9:14 am    Post subject: Reply with quote

Newbie

Joined: 15 Sep 2005
Posts: 2

Adding to the above post .. when i set
mqMessage.CharacterSet = 500;
it is throwing error 2142 [MQRC_HEADER_ERROR]

Thanks,
Pradeep
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 15, 2005 9:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think your C# strings are in Unicode, and you need to set them to ASCII.

Also, I think you're doing very bad things with your msgID and correlID.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Error 2142 when coding in C# from Windows NT box
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.