IBM Support

What factor determines the value for the CCSID attribute of IBM MQ queue managers?

Question & Answer


Question

What factor determines the value for the CCSID attribute of IBM MQ queue managers?

Answer

The determining factor is the "internationalization locale" of the user id that is creating the queue manager.
.
+ WINDOWS:
.
- In Windows, the following command can be used to find out the locale:
C:\> systeminfo | findstr "Locale"
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
- For details on how to use the Windows graphical tools to change the locale, please see some of the tutorials available in the web, such as:
https://www.tenforums.com/tutorials/132050-change-system-locale-windows-10-a.html
How to Change System Locale in Windows 10
.
+ UNIX/LINUX:
.
The rest of this note is targeted for Linux, AIX, and other UNIXes.
.
The value of the environment variable LANG at the time of the creation of the queue manager.
.
This variable determines the "internationalization locale" of the session, for things such as language, code page, currency, etc.
You can use the Unix command "locale" to find our more details.
.
In my test RHEL systems, the default LANG for any user, including root and mqm, is:
.
$ echo $LANG
LANG=en_US.UTF-8
.
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
.
A shortcoming of the above command is that the "code page" or "Code Character Set" is not displayed.
You need to use the following command:
.
$  locale charmap
UTF-8
.
When a new queue manager is created, then the value of LANG determines the value of the attribute CCSID for the queue manager.
.
$ echo "DISPLAY QMGR CCSID" | runmqsc ENUSUTF8U
QMNAME(ENUSUTF8U)                       CCSID(1208)
.
Note that this CCSID attribute is set during the creation of the queue manager.
Subsequent restarts of the queue manager will NOT affect this value, even if the value of LANG is changed.
.
For example, if the value of LANG is changed for the mqm user, and the queue manager is restarted, the value for CCISD for the queue manager will remain the same.
.
But if you changed LANG to another value and then you create a new queue manager, then that new queue manager will set the value for CCSID based on the current LANG.
.
For example,
.
$ export LANG=en_US
.
Notice that the code page is different:
.
$ locale charmap
ISO-8859-1
.
And if a new queue manager is created, then the value for CCSID will be 819 (and not 1208)
$ echo "DISPLAY QMGR CCSID" | runmqsc ENUS
   QMNAME(ENUS)                            CCSID(819)
.
I did several experiments with LANG and creating new queue managers and then displaying the CCSID of the newly created queue managers. 
.
Here are my findings for en_US, including what happens when LANG is NOT specified (I issued "unset LANG" in order to NOT have en explicitly set LANG, but underneath it is like using "LANG=POSIX")
.
To populate the table, I issued the following command to find out the installed locales in my test system and filtered the ones for English US.
.
$ locale -a | grep en | grep US
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
.
I noticed that my default locale is "en_US.UTF-8" and I do not know why it is not listed above. I thought that it will be included in the list in "locale -a".
But that is the reason that I added explicitly this default locale into the following table.
.
OK, here is the table:
.
LANG                 locale charmap    CCSID of queue manager
en_US.UTF-8          UTF-8               CCSID(1208)
en_US.utf8           UTF-8               CCSID(1208)
en_US                ISO-8859-1          CCSID(819)
en_US.iso88591       ISO-8859-1          CCSID(819)
en_US.iso885915      ISO-8859-15         CCSID(923)
(blank - unset LANG) ANSI_X3.4-1968      CCSID(819)

.
+++ end +++

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"ARM Category":[{"code":"a8m0z00000008ObAAI","label":"Components and Features->Administration"}],"ARM Case Number":"TS006673352","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Document Information

Modified date:
31 August 2021

UID

ibm16485203