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 IndexIBM MQ API SupportHow to connect to two QMs which support different ccsid?

Post new topicReply to topic
How to connect to two QMs which support different ccsid? View previous topic :: View next topic
Author Message
Jerry789
PostPosted: Wed Feb 12, 2020 6:24 am Post subject: How to connect to two QMs which support different ccsid? Reply with quote

Novice

Joined: 16 Dec 2016
Posts: 11

Hello,
For .NET apps I've been always specifying the CCSID using environmental variable
Code:
Environment.SetEnvironmentVariable("MQCCSID", "437")


However now I need to connect to two queue managers which supports different CCSIDs. Is there a way how to specify the ccsid per connection?
Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 12, 2020 10:08 am Post subject: Reply with quote

Grand High Poobah

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

That environment variable indicates the CCSID your app wishes to use and already overrides the one set on the queue manager; see here. If you don't set a CCSID on your client the queue manager will default to the one it's set to but a queue manager supports any code page that's available in the OS it's running on.

The key point is that the CCSID you use must match the code page of the message payload. If that differs from the code page of the MQ client reading the message and all the requirements for conversion are met the queue manager will attempt to convert the message payload to the target code page. In all other circumstances the queue manager will deliver the message as put and assume the application will sort it out.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Feb 12, 2020 3:49 pm Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7608

Vitor wrote:
If you don't set a CCSID on your client the queue manager will default to the one it's set to but a queue manager supports any code page that's available in the OS it's running on.

If by client you mean MQ Client, asking for CCSID 0 (same as "not setting it") means the MQ Client libraries will automatically set the message's MQMD CCSID to the code set of the client platform, not the queue manager. This is almost always what you want.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportHow to connect to two QMs which support different ccsid?
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.