Professional Documents
Culture Documents
Websphere MQ Data Conversion PDF
Websphere MQ Data Conversion PDF
Agenda
Terms and Definitions
Customer Scenarios
IBM Technotes
Useful Links
Summary
Code Page
(AKA Code set) A code page can be defined as a table
with a mapping of alphanumeric code and its binary
representation.
Where each character in a character set is assigned a
numerical representation (often used interchangeably
with character set e.g. charset in HTML)
MQMD
The Message Descriptor is not entirely character data, so
some of it will be converted as character data, some as
numeric, and some is passed unconverted.
MQMD
There are two parts to a MQ message.
There is a Message Descriptor (MQMD), followed by User data.
MQMD : Encoding
Encoding is generally taken to mean the method
that this platform uses to represent numeric data.
There are two general types:
LittleEndian, used by Intel processors (e.g
Windows, Linux on Intel). e.g. the number 437
would be represented (in hex) as XBF01 (we
refer to this as byte swap)
BigEndian. e.g. the number 437 would be
represented (in hex) as X01BF.
CCSID
The Queue Manager CCSID is important as it
defines the default CCSID for messages being
created using MQPUT and is the default CCSID
which will be used for conversion when messages
are retrieved using MQGET. If the channel option
CONVERT(YES) is set the conversion is attempted
for the receiving Queue Managers CCSID.
MQMD : CodedCharSetId
Some well known CCSIDs:
MQMD : Format
This indicates to the receiver of a message the format of the
application data in the message.
The queue manager has a number of built-in formats
with names beginning MQ, for example MQFMT_STRING. If these
do not meet your needs, you can define your own formats (user-
defined formats), but you must not use names beginning with MQ for
these. When you create and use your own formats, you must write a
data-conversion exit to support a program getting the message
using MQGMO_CONVERT.
The format name MQFMT_NONE is a special value that indicates
that the nature of the data in the message is undefined. As a
consequence, the queue manager does not attempt conversion
when the message is retrieved from the queue.
FORMAT
The queue manager built-in formats all have names beginning with
MQFMT. They are listed and described in the WebSphere MQ
Application Programming Reference under the Format field of the
Message descriptor (MQMD)
Some built-in formats
MQFMT_NONE (default)
MQFMT_STRING (for character data conversion)
MQFMT_DEAD_LETTER_HEADER
MQFMT_IMS
MQFMT_IMS_VAR_STRING
MQFMT_PCF
MQFMT_RF_HEADER
MQFMT_RF_HEADER_2
MQFMT_TRIGGER
MQFMT_XMIT_Q_HEADER
Customer Scenario 1
iSeries/Sender VSE/Receiver
WMQ Level 5.3 WMQ Level 2.1.2
OS Level 530 OS Level ???
QMGR CCSID 37 QMGR CCSID 1047
Sender Convert *YES
Customer Scenario 2
iSeries/Sender zOS/Receiver
WMQ Level 5.3.12 WMQ Level 5.3.1
OS Level 530 OS Level ???
QMGR CCSID 37 QMGR CCSID 5026
Sender Convert *NO
Work-Around
Implement an intermediate queue manager
iSeries (CCSID 37) z/OS (CCSID 5035)
z/OS (CCSID 5026)
Customer Scenario 3
Windows/Sender iSeries/Receiver
WMQ Level 5.3.10 WMQ Level 5.3.11
OS Level ??? OS Level ???
QMGR CCSID 437 QMGR CCSID 500
! A5 5A 4F
F5 5F BA
A4 4A B0
| F4 4F BB
[ AB BA A4
] BB BB A5
^ 0B B0 5F
Customer Scenario 4
Sun Solaris/WMQ Client z/OS /SVRCONN and RCVR
WMQ Level 5.3.12 WMQ Level 5.3.12
OS Level ??? OS Level ???
Putting Application CCSID 819 QMGR CCSID 500
Must have Client attachment
z/OS / Sender
WMQ Level
Problem: Messages put to z/OS
OS Level ??? queue with a CCSID of 819 are
QMGR CCSID 500 processed properly by the
Getting client (Windows)
Windows / WMQ Client application. However,
WMQ Level messages put by the z/OS
OS Level queue manager with CCSID of
Getting Application CCSID 1252 500 are not converted by getting
client application.
Customer Scenario 5
iSeries /SDR Tandem /RCVR
WMQ Level 5.3.12 WMQ Level 5.1
OS Level 5.2 OS Level K1000
QMGR CCSID 420 QMGR CCSID 1089
Windows / RCVR
WMQ Level 6.0.0.0
OS Level 2003 SP1
QMGR CCSID 1256
Problem Determination
Complete problem description
WMQ Environment description
WMQ Level, for example WMQ 6.0.2.2
OS level, for example iSeries 5.3.0; Windows XP SP2
QMGR CCSID, for example 37, 437, 5026, 1047
QMGR Sender Channel CONVERT setting
Putting Application MQMD CCSID and Format setting
Getting Application MQMD CCSID setting
Capture the message on the XMITQ.
Verify if it is correct.
Capture the message on the Destination Queue.
Verify if it is correct
WMQ Trace on both sending and receiving servers
IBM MustGather Technote : 1176955
IBM Technotes
MustGather: Documentation required by 1176955
WebSphere MQ data conversion
Data Conversion under WebSphere MQ 7005729
Conversion character differences between 1207860
CCSID 037 and CCSID 500
Data conversion in MQ intermittently does 1240018
not behave as expected
EBCDIC NL character is not converting 1116311
correctly in ASCII 0x15 (EBCDIC NL)
converts to 0xDA
AMQ6174 MQRC 2119 putting a message 1109867
to a remote queue
Useful Links
WebSphere MQ Support
www.ibm.com/software/integration/wmq/support
System i Globalization
http://www.ibm.com/servers/eserver/iseries/software/globali
zation/
Unicode Home Page
http://www.unicode.org/
Character Sets and Code Pages, Encoding
http://www.i18nguy.com/unicode/codepages.html
Language Tools
http://www.google.com/language_tools?hl=en
http://babelfish.altavista.com/
Useful Tools
WebSphere MQ Supportpac
IH03 (IH03: WebSphere Message Broker V6-Message display,
test & performance utilities)
IBM Technote 4000637
RFHUTIL and RFHUTILC allows enduser to place test message
to a queue with a particular CCSID
WebSphere MQ Sample
AMQSBCG (distributed (Windows and Unix))
AMQSBCG4 (iSeries)
These programs are passed the name of a queue and a queue
manager. It then reads each message from the queue and
outputs the following to the stdout
Formatted message descriptor fields
Message data (dumped in hex and, where possible,
character format)
AMQSBCG/AMQSBCG4
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : ' '
Priority : 0 Persistence : 0
MsgId : X'C1D4D840C3D6D4D4D6D540404040404046D2D73320001402'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ :' '
ReplyToQMgr : 'COMMON '
** Identity Context
UserIdentifier : 'STANLEY '
AccountingToken :
X'0F40404040404040404040404040404000000000000000000000000000
000008'
ApplIdentityData : ' '
AMQSBCG/AMQSBCG4 cont
** Origin Context
PutApplType : '8'
PutApplName : '021195/STANLEY/QP0ZSPWT '
PutDate : '20070903' PutTime : '18330499'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message **** length - 52 bytes
00000000: 4A61 7661 2076 6572 7369 6F6E 206F 6620 '//.?>.?.'
00000010: 7468 6520 4D51 5055 5431 2061 7069 2020 '.(&../..'
00000020: 203A 20A3 A331 302E 3030 2024 2420 A2A2 '...tt.........ss'
00000030: 2023 2320 '.... '
Documentation
The following manuals discuss MQ conversion topics. Just refer to
the index of these manuals for conversion or CCSID
WMQ Commands Manual Reference
WMQ Application Programming Reference
WMQ Application Programming Guide
Sample programs documented in this manual
WMQ Intercommunication
WMQ Conversion document
Summary
Terms and Definitions
Conversion vs. Translation
CCSID (Coded Character Set Identifier)
Encoding
IBM Technotes
Useful Links
WebSphere MQ Product Support page
www.ibm.com/software/integration/wmq/support
Search on Data Conversion to review IBM
Technotes regarding this topic