Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6655339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:30:27+00:00 2026-05-26T01:30:27+00:00

I have some strange problem. I think I followed documentation correctly but my code

  • 0

I have some strange problem. I think I followed documentation correctly but my code doesn’t work. I have this very simple hard coded test (NUnit):

[TestFixture]
public class MQQueueTests {

    public const string MessageContent = "<test>This is test message</test>";

    public static void Main(string[] args) {
        var tests = new MQQueueTests();
        tests.PutAndGetMessage();
    }

    [Test]
    public void PutAndGetMessage() {
        var properties = new Hashtable
                             {
                                 {MQC.HOST_NAME_PROPERTY, "TestServer"},
                                 {MQC.CHANNEL_PROPERTY, "Test.Channel"},
                                 {MQC.PORT_PROPERTY, 1415},
                                 // Is this correct? It looks like it is not 
                                 // enough because adding this line didn't solve 
                                 // the problem.
                                 {MQC.CCSID_PROPERTY, 437}  
                             };

        using (var manager = new MQQueueManager("Test.Queue.Manager", properties)) {
            using (MQQueue queue = manager.AccessQueue("Test.Queue", 
                MQC.MQOO_OUTPUT | MQC.MQOO_INPUT_AS_Q_DEF)) {

                MQMessage message = new MQMessage();
                message.WriteUTF(MessageContent);
                queue.Put(message);

                MQMessage readMessage = new MQMessage();
                queue.Get(readMessage);

                Assert.AreEqual(MessageContent, readMessage.ReadUTF());

                queue.Close();
            }
            manager.Disconnect();
        }
    }
}

I’m running the test application either from console or through Resharper 6 test runner. If I run the application in test runner I always get following exception:

IBM.WMQ.MQException : MQRC_CHANNEL_CONFIG_ERROR (reason code is 2539)

The exception is thrown by MQQueueManager.Connect (called by its constructor).

If I check MQ logs I see:

AMQ9541: CCSID supplied for data conversion not supported.

EXPLANATION: The program ended because, either the source CCSID ‘437’
or the target CCSID ‘852’ is not valid, or is not currently supported.

ACTION: Correct the CCSID that is not valid, or ensure that the
requested CCSID can be supported.

If I run the application from the console I got the same error but if I change the code page for console by calling

chcp 437

My test application works. How can I configure code page from code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:30:28+00:00Added an answer on May 26, 2026 at 1:30 am

    Well I found a workaround – it can probably solve my problem but I’m not very satisfied with it. I can set up MQCCSID environment variable either globally or by calling:

    Environment.SetEnvironmentVariable("MQCCSID", "437");
    

    That will configure code page. Still I would like to use properties of a new MQQueueManager instance to setup code page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very strange problem. Under some elusive circumstances I fail to apply
I have a very strange bug, which I believe is caused by some code
I have a simple question that I think someone will answer very fast, but
I have some strange linking problem in my Visual Studio 2005 C++ project. As
I have a strange problem with some documents on my webpage. My data is
I have been noticing some very strange usage of O(1) in discussion of algorithms
I have this code, and for some reason my $.post function fires twice in
I have this code in the __constructor $this->Reliability = new Reliability(name,url); Problem: I got
I have some strange problem with table in Firefox. What I want to create
I have a very strange problem that I can't wrap my head around... I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.