Академический Документы
Профессиональный Документы
Культура Документы
Agenda
Terms and Definitions
WebSphere MQ Message Header (MQMD)
Customer Scenarios
IBM Technotes
Useful Links
Summary
Questions and Answers
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.
Note: MsgId, CorrelId, and Accounting Token are NOT
considered to be character data, and as such WILL NOT be
converted as character data. Many applications put
character data into these fields, but if the message is being
exchanged between ASCII and EBCDIC platforms, and the
application on the other side needs to be able to read these
fields, then it is the responsibility of the application (or a user
exit) to convert these fields. Also the data maybe in
hexadecimal representation for MsgID and CorrelID.
MQMD
There are two parts to a MQ message.
There is a Message Descriptor (MQMD), followed by User data.
D4C44040 00000001 00000000 00000008 MD ............
00007530 00000000 00000311 000001F4
..............4
D4D8E2E3 D9404040 00000000 00000000 MQSTR ........
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQSTR '
Priority : 0 Persistence : 0
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.
10
Platform Encoding
zSeries
AIX
iSeries
HP-UX
Windows
SINIX
Sun Solaris (on SPARC processors)
Sun Solaris (on INTEL processors)
Linux (Intel)
Linux (zSeries)
NonStop Kernel (NSK)
OVMS Alpha
Open VMS VAX
Tru64 Unix
Scheme
BigEndian
BigEndian
BigEndian
BigEndian
LittleEndian
BigEndian
BigEndian
LittleEndian
LittleEndian
BigEndian
BigEndian
BigEndian
BigEndian
BigEndian
11
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.
To display the queue manager CCSID use the
DIS QMGR command
12
MQMD : CodedCharSetId
Some well known CCSIDs:
CCSID 437 -- this is an ASCII code page, used mainly under
OS/2, DOS, and Microsoft Windows console (OEM) windows.
CCSID 850 -- this is another common ASCII code page, used
mainly on under OS/2, DOS, and Microsoft Windows console
(OEM) windows used on PCs in Europe and some AIX
locales.
CCSID 819 -- this is the ISO 8859-1 standard Western
European ASCII code page. Used by most UNIX locales.
CCSID 500 -- This is an EBCDIC code page, used mainly on
z/OS. It is known as the International codepage.
CCSID 037 -- This is another popular EBCDIC code page,
used on OS/400. It is the US English codepage.
13
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 (userdefined 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.
14
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
15
Customer Scenario 1
iSeries/Sender
WMQ Level 5.3
VSE/Receiver
WMQ Level 2.1.2
QMGR CCSID 37
Cause . . . . . :
The program ended because, either the source CCSID '&1'
or the target CCSID '&2' is not valid, or is not currently supported.
Recovery . . . :
Correct the CCSID that is not valid, or ensure that the
requested CCSID can be supported.
16
17
Customer Scenario 2
iSeries/Sender
WMQ Level 5.3.12
zOS/Receiver
WMQ Level 5.3.1
QMGR CCSID 37
18
19
20
21
Customer Scenario 3
Windows/Sender
WMQ Level 5.3.10
iSeries/Receiver
WMQ Level 5.3.11
22
23
24
CCSID 437
CCSID 37
CCSID 500
A5
5A
4F
F5
5F
BA
A4
4A
B0
F4
4F
BB
AB
BA
A4
BB
BB
A5
0B
B0
5F
25
Customer Scenario 4
Sun Solaris/WMQ Client
WMQ Level 5.3.12
z/OS / Sender
WMQ Level
OS Level ???
QMGR CCSID 500
Windows / WMQ Client
WMQ Level
OS Level
Getting Application CCSID 1252
27
28
29
Customer Scenario 5
iSeries /SDR
WMQ Level 5.3.12
OS Level 5.2
QMGR CCSID 420
Tandem /RCVR
WMQ Level 5.1
OS Level K1000
QMGR CCSID 1089
Windows / RCVR
WMQ Level 6.0.0.0
OS Level 2003 SP1
QMGR CCSID 1256
Problem: When a message is put with Arabic character LamAlif it is not being converted properly between CCSID 420 and
CCISD 1089(Tandem) or 1256(Windows).
30
31
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
32
IBM Technotes
MustGather: Documentation required by
WebSphere MQ data conversion
1176955
7005729
1207860
1240018
1116311
1109867
33
1232346
1167205
1268752
1215215
1167007
34
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/
35
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)
36
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 : '
'
37
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
00000000:
00000010:
00000020:
00000030:
38
39
:
:
:
:
40
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
All manuals and documents can be found on the WebSphere MQ
Support webpage:
www.ibm.com/software/integration/wmq/support
41
Description
37
420
Arabic EBCDIC
437
USA PC-Data
500
International EBCDIC
819
1047
1089
1252
MS-WIN Latin-1
1256
MS-WIN Arabic
42
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
43
Access key product show-me demos and tutorials by visiting IBM Education
Assistant: ibm.com/software/info/education/assistant
Learn about the Electronic Service Request (ESR) tool for submitting
problems electronically:
www.ibm.com/software/support/viewlet/probsub/ESR_Overview_viewlet_swf
.html
44
45