Three steps to enable your NLS support on IBM i

来源:互联网 发布:知乎文章和专栏 编辑:程序博客网 时间:2024/06/13 18:16

As we know, globalization makes the world fatter and smarter. A big portion of IBM i customers are from the growth market, like China and Japan. National Language Support (NLS) on IBM i is an important topic.

 

However, the users are not happy always with their NLS support. Let’s take a look at what will happen if they do not install their local NLS package. For example, if I install an IBM i system, say V6R1, without Chinese language package, and I am trying to input and output something using terminal 5250 session.

 

First, let me try to input a Chinese character, what will happen? What a pity, I can not input at all, instead, I am told ‘You are trying to input unavailable graphic character…’.

 

Figure 1 Error occurs while trying to input Chinese character

 

Next, let me try to output a text file test.txt which I wrote it on windows, as follow:

Chinese: 我的名字叫皮光明

English: My name is Pi Guang Ming

 

Then try to display it with the CCSID value 37. As you can see, the Chinese Charater我的名字叫皮光明 can not appear.  

Figure 2 Chinese character shows not correctly

 

In this article, I’ll share three steps to quickly enable NLS support on your IBM i. I will take Chinese as an example.

 

1.        Step 1. Chang your system value

l           Change system value QCHRID(Graphic character set and code page identifier) as 1174/836.

CHGSYSVAL SYSVAL(QCHRID) VALUE('1174 836')

Graphic character set: Specify the graphic character set values that match the attributes of the display device. Valid values range from 1 through 32767.

Code page: Specify the code page set values that match the attributes of the display device. Valid values range from 1 through 32767.

l           Change system value QCNTRYID(Country identifier) as ‘CN’.

CHGSYSVAL SYSVAL(QCNTRYID) VALUE(' CN ')

QCNTRYID: Specify the default country or region identifier for the system.

l           Change system value QCCSID(Coded character set identifier) as 935

CHGSYSVAL SYSVAL(QCCSID) VALUE(935)

QCCSID: Specify the CCSID for the overall IBM i system.

l           Change system value QLANGID(Language identifier) as ‘CHS’

CHGSYSVAL SYSVAL(QCCSID) VALUE(935)

QLANGID: Specify the default language identifier for the system.

Note: You can use the IBM i system value finder to quickly locate the information about system values. See IBM i and System i Information Center for more details.

 

2.        Step 2. Install 2989(Chinese) as the secondary language

Follow the following instructions given by Installing secondary languages for IBM licensed programs to install 2989(Chinese) as the second language.

 

3.        Step 3. Add NLS library into the system library list for the current thread.

CHGSYSLIBL LIB(QSYS2989) OPTION(*ADD)

 

Now, you’ve successfully enable NLS support for Chinese, change the 'Code Page' value to 1388 on the 5250 session and then sign on, you will see:

 

Figure 3 Chinese character shows properly

 

If you want to switch screen back to English, just remove NLS library from the system library list for the current thread.

CHGSYSLIBL LIB(QSYS2989) OPTION(*REMOVE)

原创粉丝点击