MQ 2539錯誤

來源:互聯網
上載者:User

今天重新設定了MQ伺服器,把MQ伺服器移動到繁體的Server上啦.配置OK.用我的用戶端串連去始終報 2539錯誤.

IBM協助檔案給出的解釋.

2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERRORExplanation

An MQCONN call was issued from a client to connect to a queue manager but the attempt to establish communication failed. Common causes of this reason code are:

  • The server and client cannot agree on the channel attributes to use.
  • There are errors in one or both of the QM.INI or MQCLIENT.INI configuration files.
  • The server machine does not support the code page used by the client.

我在伺服器上重新設定用戶端,使用amqsputc命令串連OK.所以我懷疑是The server machine does not support the code page used by the client. 的原因.查看了一下協助.

原來需要用戶端的code page設定同伺服器一致或可以相互轉換才可以.

選擇客戶機或伺服器編碼字元集標識(CCSID)

客戶機代碼假設通過客戶機中 MQI 的字元資料位於機器所配置的 CCSID 中。如果此 CCSID 是一個不支援的 CCSID 或不是必需的 CCSID,可以用 MQCCSID 環境變數覆蓋它,例如,在 Windows 上:

SET MQCCSID=850

或者,在 UNIX 系統上:

export MQCCSID=850
 

我伺服器上隊列管理器的CCSID 是950.

所以使用命令,設定用戶端CCSID

     SET MQCCSID=950

重新使用amqsputc 進行串連,串連成功,問題解決!

 

搜尋了一下網路,轉一下CCSID相關的解釋:

IBM Coded Character Set Identifiers (CCSID)碼錶

A CCSID is a Coded Character Set Identifier. The Unicode standard defines a Coded Character Set as "A character set in which each character is assigned a numeric code value." This means that a CCSID is a number that defines a numeric ordering of characters. The IBM Character Data Representation Architecture (CDRA) as defined in SC09-1390, defines CCSIDs that are used with IBM to represent character data. This architecture defines Single Byte Character Set (SBCS) CCSIDs, Multiple Byte Character Set (MBCS) CCSIDs, and Mixed CCSIDs which are a combination of SBCS and MBCS data. MBCS CCSIDs are usually used for languages, such as Chinese, Japanese, and Korean, that define a larger number of characters than can be represented in a single byte.
CCSID是一個字元集的標識。作為unicode標準通過定義一個字元集內每個字元要對應那個數字值的方式定義了一個字元集。這說明CCSID就是一個定義字元集順序的標識數位罷了。IBM的字元標識架構在文檔 SC09-1390(
http://www-304.ibm.com/jct03002c/software/globalization/cdra/index.jsp;http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/FOCREF00/CCONTENTS)中做了定義,CCSID是IBM用來標識字元序列的標識代碼。這個架構定義了SDCS(單字元集)的CCSID值,MBCS(多字元集)的CCSID值和混合單字元多字元集的混合CCSID值。多字元集的CCSID一般用於語言,比如中文,日文,韓文,這些語言的字元量很大,無法用單位元組的碼值來代表。

All SBCS CCSIDs define a similar basic set of characters, although they might define them in different numeric ordering. For instance all SBCS EBCDIC CCSIDs define the number "1" as x'F0' and all SBCS ASCII CCSIDs define the number 1 as x'30'.

CCSID間的轉換有多種類型。其中一種轉換就是從一種CCSID到另一種CCSID的轉換,舉例來說從ASCII(CCSID 1252)到EBCDIC(CCSID 37)。另一種是從串資料到另一種資料類型的轉換。舉例來說轉換字串資料到數值。在所有的這種類型的轉換中都必須標識CCSID值來保證轉換的正確進行。

但是轉換是有要求的,第一種轉換的前提是轉到的 CCSID的類型中要包含轉換前的CCSID類型中要轉換的字元,比如,如果從CCSID1381(S-CHGBPC-DATA) 類型的簡體中文的PC編碼中的一個中文字元"中"字到其他CCSID編碼轉換到的編碼起碼要求這個CCSID編碼的字元集中包含同樣的"中"字。

我從IBM找到的對CCSID說明的列表如下:

摘錄自http://www-304.ibm.com/jct03002c/software/globalization/ccsid/ccsid_registered.jsp,如果需要詳細資料,請自行查詢。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.