How to set CCSID value to 1208 in function app when trying to push message to MQ queue?

Azure-search 201 Reputation points
2023-08-18T08:32:36.69+00:00

Hi,

I have a service bus trigger which picks a message from the service bus queue, connects with MQ and pushes the message to the MQ queue. However, by default the CCSID is being set to 1200, is there a way to set the CCSID to 1208 inside function app.

This is how i'm trying to set other values:

User's image

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,670 questions
0 comments No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,421 Reputation points
    2023-08-18T14:13:01.1833333+00:00

    Azure-search Thanks for posting your question in Microsoft Q&A. Based on your description and the code snippet, you are using IBM MQ C# library and would like to set CCSID to 1208 when writing a message to MQ queue. Is that correct? (Correct me if I misunderstood)

    If so, as per doc: https://www.ibm.com/docs/en/ibm-mq/7.5?topic=interfaces-mqmessage, you can set the value using CharacterSet property in MQMessage class to 1208 as follows:

    // Set the CCSID value to 1208
    MQMessage message = new MQMessage();
    message.CharacterSet = 1208;

    Doc reference:

    User's image

    Note: ReadString method reads in Unicode and WriteString method converts the value based on the value set.

    I hope this helps with your question and let me know if you have any other.


    If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.