|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Error 2142 when coding in C# from Windows NT box |
« View previous topic :: View next topic » |
Author |
Message
|
laksdeep |
Posted: Thu Sep 15, 2005 8:15 am Post subject: Error 2142 when coding in C# from Windows NT box |
|
|
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 |
|
 |
laksdeep |
Posted: Thu Sep 15, 2005 9:14 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Thu Sep 15, 2005 9:28 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|