Discussion:
DataPower, Encoding and the OTMA Bridge
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-14 20:12:13 UTC
Permalink
We have an issue where an MQ message being sent thru the OTMA Bridge was
causing IMS to abend. DataPower was producing the message including the
IIH header. IMS kept complaining about the lenght of some fields.

Eventually we started comparing the MQMD, MQIIH and data payload between
what DataPower was producing and what a Java app was producing. The Java
app was producing request messages that were not causing an issue.

We noticed that the MQMD's Encoding field was different between the
DataPower message that abended and the Java message that worked. Also,
when viewed in Hex the MQIIH's Version field and StrucLength field were
different.

DataPower produced messages:
MQMD CCSID = 819
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Java Client produced messages:
MQMD CCSID = 819
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054


So, we asked the DataPower dude what he was setting the MQMD Encoding to
inside DataPower. He was not setting it to anything at all. He then
coded in DataPower to set the MQMD Encoding value to 273. The next
message he put now looked like the Java produced one - it had 273 for
the MQMD Encoding and the MQIIH Version and StrucLength hex bytes
flipped themselves around.

We let the message go into the OTMA bridge and success - no abend on the
mainframe and the reply came back. High fives all around! But wait a
minute, did we fix the root cause, or did we implement a work around
that's gonna break when the real problem is fixed?

Why does the mainframe deal with this OK:
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054

But abends on this:
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Does 546 correctly describe 01000000 and 54000000 in the MQIIH?
If yes, shouldn't the mainframe be able to deal with it correctly? If it
can't is there a bug on the mainframe side?

If 546 does not correctly describe the data, why does DataPower produce
a 546 message by default - is that the bug?


This is the first time we are using DataPower to send to the IMS Bridge.
But more importantly, I bet this is the first time we are using
DataPower to send MQ messages with something other than plain character
data in it, and thus the first time that the MQMD Encoding field is
relevant.

Peter Potkay



************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
John Harris
2013-06-14 20:47:32 UTC
Permalink
<html> <body> <div style="font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"> <div>Hi Peter </div> <div>&nbsp; </div> <div>This sounds like the Big-Endian/Little Endian issue where the HI Word and LO Word are reversed and within </div> <div>those the HI Byte and LO Bytes are reversed as well with regards to integers/long values. Following those rules your 54000000 (Big Endian) would be 00000054 in Little Endian. </div> <div>&nbsp; </div> <div>It seems that the DataPower is not using the using the correct numeric code page identifier and no </div> <div>conversion is done on the numerical data in order to transpose the HI/LO Words/Bytes between the </div> <div>different hardware architectures with zOS IMS)&nbsp;expecting Big Endian and&nbsp;DataPower transmitting Little-Endian. </div> <div>&nbsp; <br /> <br /> <br /> </div> <div style="FONT-SIZE: 10pt; FONT-FAMILY: verdana,arial,helvetica,sans-serif; COLOR: rgb(0,0,0)"> <div> <div> <p>&nbsp; </p> <p>&nbsp; Regards, </p> <p>&nbsp; </p> <p><font size="5" face="monotype corsiva, apple chancery, script, comic sans ms, arial, sans-serif"><strong>John Harris </strong></font> </p> <p align="left">Email : <a href="mailto:John_Harris-***@public.gmane.org">John_Harris-***@public.gmane.org</a> </p> <p>Email : <a href="mailto:John_Harris-r/Jw6+rmf7HQT0dZR+***@public.gmane.org">***@us.ibm.com</a> </p> <p>Tel : (+1) 678-386-3269 </p> </div> </div> </div> <div> <br /> <br /> <br /> </div> <div style="FONT-SIZE: 10pt; FONT-FAMILY: verdana,arial,helvetica,sans-serif; COLOR: rgb(0,0,0)">------ Original Message ------ <br /><b>Received: </b>04:12 PM EDT, 06/14/2013 <br /><b>From: </b>"Potkay, Peter M (CTO Architecture + Engineering)" &lt;Peter.Potkay-***@public.gmane.org&gt;
<br /><b>To: </b>MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
<br /><b>Subject: </b>DataPower, Encoding and the OTMA Bridge
<br />
<br />
<br />
<div id="usanet1371242129623HSGWKT"><zeta content="text/html; charset=us-ascii" http-equiv="Content-Type"><zeta content="MS Exchange Server version 6.5.7655.10" name="Generator">&nbsp;<!-- Converted from text/rtf format -->
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">We have an issue where an MQ message being sent thru the OTMA Bridge was causing IMS to abend. DataPower was producing the message including the IIH header. IMS kept complaining about the lenght of some fields.</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">Eventually we started comparing the MQMD, MQIIH and data payload between what DataPower was producing and what a Java app was producing. The Java app was producing request messages that were not causing an issue.</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">We noticed that the MQMD's Encoding field was different between the DataPower message that abended and the Java message that worked. Also, when viewed in Hex the MQIIH's Version field and StrucLength field were different.</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">DataPower produced messages:</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD CCSID = 819</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD Encoding = 546</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH Version Field (in hex) = 01000000</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH StrucLength Field (in hex) = 54000000</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">Java Client produced messages:</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD CCSID = 819</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD Encoding = 273</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH Version Field (in hex) = 00000001</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH StrucLength Field (in hex) = 00000054</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">So, we asked the DataPower dude what he was setting the MQMD Encoding to inside DataPower. He was not setting it to anything at all. He then coded in DataPower to set the MQMD Encoding value to 273. The next message he put now looked like the Java produced one - it had 273 for the MQMD Encoding and the MQIIH Version and StrucLength hex bytes flipped themselves around.</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">We let the message go into the OTMA bridge and success - no abend on the mainframe and the reply came back. High fives all around! But wait a minute, did we fix the root cause, or did we implement a work around that's gonna break when the real problem is fixed?</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">Why does the mainframe deal with this OK:</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD Encoding = 273</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH Version Field (in hex) = 00000001</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH StrucLength Field (in hex) = 00000054</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">But abends on this:</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQMD Encoding = 546</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH Version Field (in hex) = 01000000</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">MQIIH StrucLength Field (in hex) = 54000000</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">Does 546 correctly describe 01000000 and 54000000 in the MQIIH?</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">If yes, shouldn't the mainframe be able to deal with it correctly? If it can't is there a bug on the mainframe side?</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">If 546 does not correctly describe the data, why does DataPower produce a 546 message by default - is that the bug?</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us">
<br />
<br />
<br /></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Verdana">This is the first time we are using DataPower to send to the IMS Bridge. But more importantly, I bet this is the first time we are using DataPower to send MQ messages with something other than plain character data in it, and thus the first time that the MQMD Encoding field is relevant.</font></span><span lang="en-us"></span>
</p>
<p dir="ltr"><span lang="en-us"><b></b></span><span lang="en-us"><b></b></span><b><span lang="en-us"></span></b><b><span lang="en-us"><font size="2" face="Arial">Peter Potkay</font></span></b><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font face="Calibri">
<br /></font></span>
</p>
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span>
</p>
<p dir="ltr"><span lang="en-us"></span>
</p>
<p>************************************************************
<br />This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information.&nbsp; If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited.&nbsp; If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
<br />************************************************************
</p>
<br />
<hr /> <center><font size="-1"><a href="http://listserv.meduniwien.ac.at/archives/mqser-l.html">List Archive</a> - <a href="http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&amp;A=1">Manage Your List Settings</a> - <a href="mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&amp;BODY=signoff%20mqseries">Unsubscribe</a> </font><font size="-1">
<p>Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at <a href="http://www.lsoft.com/resources/manuals.asp">http://www.lsoft.com</a>
</p></font></center>
<br /></zeta></zeta>
</div>
</div>

<br>
</div>
</body>
</html>
<br><hr><center><font size=-1>
<a href="http://listserv.meduniwien.ac.at/archives/mqser-l.html">List Archive</a> -
<a href="http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1">Manage Your List Settings</a> -
<a href="mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries">Unsubscribe</a>
</font><font size=-1><p>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at <a href="http://www.lsoft.com/resources/manuals.asp">http://www.lsoft.com</a>
</p></font>
</center>
Tim Zielke
2013-06-14 20:55:20 UTC
Permalink
Hi Peter,

Just an observation that maybe helpful.

The IBM mainframes are big endian. This means it would read a multi-byte hex value like x'01000000' as decimal 16,777,216 and x'54000000' as decimal 1,409,286,144.

x'01000000' in little endian is x'000000001' in big endian.
x'54000000' in little endian is x'000000054' in big endian.

So it looks like the DataPower was setting the Version Field and StrucLength Field in a little endian format when the MQMD encoding was 546 and in a big endian format when the MQMD encoding was 273.

According to the MQ manual, 546 is Linux and 273 is Unix. But Linux and Unix are not big-endian or little-endian, per se. It is the CPU that is big-endian or little-endian. So if Linux is running on an x86 processor (which is little-endian), then multi-byte binary fields are stored as little-endian. If Linux is running on a Sparc processor (which is big-endian), then multi-byte binary fields are stored as big-endian.

I don't know anything about DataPower to say why changing the Encoding field changed the endianness, but hopefully this helps.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Friday, June 14, 2013 3:12 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: DataPower, Encoding and the OTMA Bridge


We have an issue where an MQ message being sent thru the OTMA Bridge was causing IMS to abend. DataPower was producing the message including the IIH header. IMS kept complaining about the lenght of some fields.

Eventually we started comparing the MQMD, MQIIH and data payload between what DataPower was producing and what a Java app was producing. The Java app was producing request messages that were not causing an issue.

We noticed that the MQMD's Encoding field was different between the DataPower message that abended and the Java message that worked. Also, when viewed in Hex the MQIIH's Version field and StrucLength field were different.

DataPower produced messages:
MQMD CCSID = 819
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Java Client produced messages:
MQMD CCSID = 819
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054


So, we asked the DataPower dude what he was setting the MQMD Encoding to inside DataPower. He was not setting it to anything at all. He then coded in DataPower to set the MQMD Encoding value to 273. The next message he put now looked like the Java produced one - it had 273 for the MQMD Encoding and the MQIIH Version and StrucLength hex bytes flipped themselves around.

We let the message go into the OTMA bridge and success - no abend on the mainframe and the reply came back. High fives all around! But wait a minute, did we fix the root cause, or did we implement a work around that's gonna break when the real problem is fixed?

Why does the mainframe deal with this OK:
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054

But abends on this:
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Does 546 correctly describe 01000000 and 54000000 in the MQIIH?
If yes, shouldn't the mainframe be able to deal with it correctly? If it can't is there a bug on the mainframe side?

If 546 does not correctly describe the data, why does DataPower produce a 546 message by default - is that the bug?


This is the first time we are using DataPower to send to the IMS Bridge. But more importantly, I bet this is the first time we are using DataPower to send MQ messages with something other than plain character data in it, and thus the first time that the MQMD Encoding field is relevant.

Peter Potkay

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Dominique Courtois
2013-06-14 21:39:48 UTC
Permalink
Hi ,

As per the MQconstants manual 546 (hex 222) is
MQENC_(INTEGER/DECIMAL/FLOAT)_REVERSED which means little endian.
273 (hex 111) means MQENC_(INTEGER/DECIMAL/FLOAT)_NORMAL which is big
endian.

The trouble in this is that both cases are internally coherent. When the
MQMD.Encoding is set to little endian, the values in the MQIIH header seems to
be little endian. The same for big endian.

It looks like the OTMA Bridge is not considering the value of the MQMD.Encoding
and expecting only big endian values which I can't believe.

One more question : where (what point in the message travel) did you look at the
MQIIH fields values ? (before or after conversion by the receiver).

Regards

Dominique Courtois

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-14 21:47:36 UTC
Permalink
Tim / John,

We started looking at the MQMD Encoding field when I was comparing the
DataPower produced message to the Java client produced message in
rfhutilc.



The Int Fmt and PD Fmt field in rfhutilc showed "PC" for the DataPower
message. It showed Unix and Host, respectively, for the Java message.



It seemed odd that DataPower would produce something "PC" related. Once
we told DataPower to set the encoding to 273, and stop defaulting to
546, it started to work.



I agree it's big versus little endian that is the issue here. What I
can't determine is:

1. Is Datapower producing garbage data when you let it default and
choose 546 as the Encoding?

2. Does Datapower have the capability to produce either 546 or 273
encoded messages, in both cases the data is described correctly by the
header, and the problem lies on the mainframe side because it can't
correctly convert 546 encoded messages?





We were being told by the mainframe guys that "the length was all messed
up" when the problem was occurring, but that doesn't help me understand
if its option 1 or 2 above as to the root cause.
From the rfhutilc manual
"PD Enc

This field indicates how packed decimal fields in the user data are
encoded. A value of PC

indicates that the bytes in packed decimal fields are in "little-endian"
order, whereas a value of

Host indicates that bytes in packed decimal fields are in "big-endian"
order (e.g. as on a 390).

Since the CICS bridges do not perform data translation of binary or
packed decimal data, the

value of the encoding field does not usually matter. It should be set to
a valid non-zero value.

Int Enc

This entry indicates how binary and floating point fields in the user
data are encoded. A value

of PC indicates that the bytes in binary and floating-point fields are
in "little-endian" order, as

on an Intel processor. A value of Host or Unix indicates binary and
floating-point fields are in

"big-endian" order. Floating point fields will be in 390-format if a
value of Host is selected,

and in IEEE format if a value of Unix or PC is chosen."



Peter Potkay





From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On
Behalf Of Tim Zielke
Sent: Friday, June 14, 2013 4:55 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



Hi Peter,



Just an observation that maybe helpful.



The IBM mainframes are big endian. This means it would read a
multi-byte hex value like x'01000000' as decimal 16,777,216 and
x'54000000' as decimal 1,409,286,144.



x'01000000' in little endian is x'000000001' in big endian.

x'54000000' in little endian is x'000000054' in big endian.



So it looks like the DataPower was setting the Version Field and
StrucLength Field in a little endian format when the MQMD encoding was
546 and in a big endian format when the MQMD encoding was 273.



According to the MQ manual, 546 is Linux and 273 is Unix. But Linux and
Unix are not big-endian or little-endian, per se. It is the CPU that is
big-endian or little-endian. So if Linux is running on an x86 processor
(which is little-endian), then multi-byte binary fields are stored as
little-endian. If Linux is running on a Sparc processor (which is
big-endian), then multi-byte binary fields are stored as big-endian.



I don't know anything about DataPower to say why changing the Encoding
field changed the endianness, but hopefully this helps.



Thanks,

Tim



From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On
Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Friday, June 14, 2013 3:12 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: DataPower, Encoding and the OTMA Bridge



We have an issue where an MQ message being sent thru the OTMA Bridge was
causing IMS to abend. DataPower was producing the message including the
IIH header. IMS kept complaining about the lenght of some fields.

Eventually we started comparing the MQMD, MQIIH and data payload between
what DataPower was producing and what a Java app was producing. The Java
app was producing request messages that were not causing an issue.

We noticed that the MQMD's Encoding field was different between the
DataPower message that abended and the Java message that worked. Also,
when viewed in Hex the MQIIH's Version field and StrucLength field were
different.

DataPower produced messages:
MQMD CCSID = 819
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Java Client produced messages:
MQMD CCSID = 819
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054


So, we asked the DataPower dude what he was setting the MQMD Encoding to
inside DataPower. He was not setting it to anything at all. He then
coded in DataPower to set the MQMD Encoding value to 273. The next
message he put now looked like the Java produced one - it had 273 for
the MQMD Encoding and the MQIIH Version and StrucLength hex bytes
flipped themselves around.

We let the message go into the OTMA bridge and success - no abend on the
mainframe and the reply came back. High fives all around! But wait a
minute, did we fix the root cause, or did we implement a work around
that's gonna break when the real problem is fixed?

Why does the mainframe deal with this OK:
MQMD Encoding = 273
MQIIH Version Field (in hex) = 00000001
MQIIH StrucLength Field (in hex) = 00000054

But abends on this:
MQMD Encoding = 546
MQIIH Version Field (in hex) = 01000000
MQIIH StrucLength Field (in hex) = 54000000

Does 546 correctly describe 01000000 and 54000000 in the MQIIH?
If yes, shouldn't the mainframe be able to deal with it correctly? If it
can't is there a bug on the mainframe side?

If 546 does not correctly describe the data, why does DataPower produce
a 546 message by default - is that the bug?


This is the first time we are using DataPower to send to the IMS Bridge.
But more importantly, I bet this is the first time we are using
DataPower to send MQ messages with something other than plain character
data in it, and thus the first time that the MQMD Encoding field is
relevant.

Peter Potkay

************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender immediately
by return e-mail, delete this communication and destroy all copies.
************************************************************



________________________________

List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> -
Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=sign
off%20mqseries>

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>



________________________________

List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> -
Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=sign
off%20mqseries>

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-14 21:49:36 UTC
Permalink
Dominique,
We would send the message to a local queue on a Linux server and look at
it at the hexadecimal level, before any conversion.
" It looks like the OTMA Bridge is not considering the value of the
MQMD.Encoding and expecting only big endian values which I can't
believe."
It sure seems that way, doesn't it?


Peter Potkay


-----Original Message-----
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On
Behalf Of Dominique Courtois
Sent: Friday, June 14, 2013 5:40 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi ,

As per the MQconstants manual 546 (hex 222) is
MQENC_(INTEGER/DECIMAL/FLOAT)_REVERSED which means little endian.
273 (hex 111) means MQENC_(INTEGER/DECIMAL/FLOAT)_NORMAL which is big
endian.

The trouble in this is that both cases are internally coherent. When the
MQMD.Encoding is set to little endian, the values in the MQIIH header
seems to be little endian. The same for big endian.

It looks like the OTMA Bridge is not considering the value of the
MQMD.Encoding and expecting only big endian values which I can't
believe.

One more question : where (what point in the message travel) did you
look at the MQIIH fields values ? (before or after conversion by the
receiver).

Regards

Dominique Courtois

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and, in the
message body (not the subject), write: SIGNOFF MQSERIES Instructions for
managing your mailing list subscription are provided in the Listserv
General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Schanz, Arthur
2013-06-17 12:57:20 UTC
Permalink
Resending to correct horrible formatting of previous response and to add comment about channel conversion...

Peter -

Here are a few things to verify:

* Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
* Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
* Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
* We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
* Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[X]

[X]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219 Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>






To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Schanz, Arthur
2013-06-17 12:50:13 UTC
Permalink
Peter -

Here are a few things to verify:

+ Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
+ Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
+ Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
+ We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art

Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org
        





-----Original Message-----
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Friday, June 14, 2013 5:50 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Dominique,
We would send the message to a local queue on a Linux server and look at it at the hexadecimal level, before any conversion.
" It looks like the OTMA Bridge is not considering the value of the
MQMD.Encoding and expecting only big endian values which I can't believe."
It sure seems that way, doesn't it?


Peter Potkay


-----Original Message-----
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Dominique Courtois
Sent: Friday, June 14, 2013 5:40 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi ,

As per the MQconstants manual 546 (hex 222) is MQENC_(INTEGER/DECIMAL/FLOAT)_REVERSED which means little endian.
273 (hex 111) means MQENC_(INTEGER/DECIMAL/FLOAT)_NORMAL which is big endian.

The trouble in this is that both cases are internally coherent. When the MQMD.Encoding is set to little endian, the values in the MQIIH header seems to be little endian. The same for big endian.

It looks like the OTMA Bridge is not considering the value of the MQMD.Encoding and expecting only big endian values which I can't believe.

One more question : where (what point in the message travel) did you look at the MQIIH fields values ? (before or after conversion by the receiver).

Regards

Dominique Courtois

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-17 14:08:31 UTC
Permalink
Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
* You mention "We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS". Can you expand on that - are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I'm searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager's OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
"The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class."

"Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message...."


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

"*Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue."

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a "supported encoding".

I don't know what "If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing" means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I'm going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion...

Peter -

Here are a few things to verify:

* Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
* Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
* Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
* We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
* Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[X]


[X]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>

[cid:image001.jpg-N7lN6I4RsIElFVzqM+***@public.gmane.org]

[cid:image002.jpg-N7lN6I4RsIElFVzqM+***@public.gmane.org]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Schanz, Arthur
2013-06-17 14:31:51 UTC
Permalink
Peter -

We found early on in our OTMA 'journey' that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS - hence the comment about no 'application' having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything 'special' to generate the msgs - just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic...or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
* You mention "We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS". Can you expand on that - are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I'm searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager's OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
"The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class."

"Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message...."


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

"*Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue."

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a "supported encoding".

I don't know what "If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing" means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I'm going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion...

Peter -

Here are a few things to verify:

* Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
* Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
* Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
* We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
* Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>

[cid:image008.jpg-***@public.gmane.org]

[cid:image009.jpg-***@public.gmane.org]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-17 15:13:29 UTC
Permalink
That is a good idea Art. I'll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We'll have the DP appliance comment out the part where they set the MQMD's Encoding to 273 and let it default to 546. And then we'll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter -

We found early on in our OTMA 'journey' that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS - hence the comment about no 'application' having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything 'special' to generate the msgs - just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic...or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:MQSERIES-0lvw86wZMd9k/***@public.gmane.orgAC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
* You mention "We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS". Can you expand on that - are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I'm searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager's OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
"The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class."

"Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message...."


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

"*Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue."

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a "supported encoding".

I don't know what "If the queue manager that owns the IMS bridge queue is using CICS(r) for distributed queuing" means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I'm going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:MQSERIES-0lvw86wZMd9k/***@public.gmane.orgAC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion...

Peter -

Here are a few things to verify:

* Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
* Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
* Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
* We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
* Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org<mailto:Arthur.Schanz-***@public.gmane.org>

[cid:image007.jpg-T1MUgzOP/GgYonIk/***@public.gmane.org]

[cid:image008.jpg-T1MUgzOP/GgYonIk/***@public.gmane.org]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-19 16:17:45 UTC
Permalink
Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6CE6.E30FE270]

[cid:***@01CE6CE6.E30FE270]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Tim Zielke
2013-06-19 18:58:15 UTC
Permalink
Hi Peter,

For those examples where you list the DataPower MQ Client and Red Hat Linux QM, can you also provide what CPU model (i.e. x86, Sparc, etc.) that the server is using? My understanding is endianness is determined by the CPU hardware not the operating system, so I am curious what CPU hardware is being used.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 11:18 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay



From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6CF5.05215160]

[cid:***@01CE6CF5.05215160]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Schanz, Arthur
2013-06-19 20:06:12 UTC
Permalink
Peter –


· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:

<!-- Create MQIIH header to prefix the message data -->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>

This is what occurs, based on that setting:

[cid:***@01CE6D06.EA9619E0]


· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.

Put these together and it is obvious that supplying the correct Encoding value should do the trick.

Art

________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay



From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6CFF.905C6E40]

[cid:***@01CE6CFF.905C6E40]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Tim Zielke
2013-06-19 20:10:46 UTC
Permalink
A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim

From: Tim Zielke
Sent: Wednesday, June 19, 2013 1:58 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: RE: DataPower, Encoding and the OTMA Bridge

Hi Peter,

For those examples where you list the DataPower MQ Client and Red Hat Linux QM, can you also provide what CPU model (i.e. x86, Sparc, etc.) that the server is using? My understanding is endianness is determined by the CPU hardware not the operating system, so I am curious what CPU hardware is being used.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 11:18 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6CFE.6A360060]

[cid:***@01CE6CFE.6A360060]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Darren Douch
2013-06-19 21:58:02 UTC
Permalink
Fairly certain that there have also been issues in the past with MQ client
builds not setting endian-ness correctly, although of course it can be tricky if
a client app is on one platform and the qmgr it is connecting to is on another
... using qmgr_default would likely be incorrect in that case and the client app
would have to be a little 'smarter'.

Darren
Post by Tim Zielke
A few other thoughts.
Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1
server to see what the relevant values are before it is sent to the Red Hat
Linux QM? That might provide some further clues.
Looking at this doc on Encoding in the manual, ->
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20
it seems to say if I am reading it correctly that a decimal value of 546 which
they call "Linux or Windows" is integer reverse or little endian. And 273
which they call "IBM I or Unix" is integer normal or big endian. So to me,
that would explain the behavior you are seeing with the multi-byte binary
values in the MQIIH appearing as little endian (with 546) and big endian (with
273). If the message data is a string, there would be no alteration between
little endian and big endian, as each byte is treated as a separate byte.
It might be more semantics, but I do not understand why they refer to Linux as
little endian. Linux can run on either big (Sparc) or little (x86) endian
processors and Linux itself does not have an endianness. It just matches the
endianness for the CPU it will run on top of. So to me, those labels are
confusing and misleading.
Thanks,
Tim
*From:*Tim Zielke
*Sent:* Wednesday, June 19, 2013 1:58 PM
*Subject:* RE: DataPower, Encoding and the OTMA Bridge
Hi Peter,
For those examples where you list the DataPower MQ Client and Red Hat Linux
QM, can you also provide what CPU model (i.e. x86, Sparc, etc.) that the
server is using? My understanding is endianness is determined by the CPU
hardware not the operating system, so I am curious what CPU hardware is being
used.
Thanks,
Tim
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Wednesday, June 19, 2013 11:18 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
*Message A*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
without specifying the MQMD Encoding on the MQPUT. The message ends up with an
Encoding of 546, the CCSID is 819. The app data payload is built with a WTX
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM
looking at the data with the Text and Hex columns turned on.
*Code:*
I I H T 49494820 01000000 54000000 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
*Message B*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an
Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex.
Notice the difference in endianess of the 2nd and 3rd block of data when
compared to Message A.
*Code:*
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows. Notice
the bytes are exactly the same when compared to Message A, but the MQMD has a
different Encoding describing these exact bytes. Uh oh, you can see there is
going to be a conversion issue.
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header,
in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes
are produced in the MQIIH Header, but it is not having an effect on the bytes
in the message payload?
Repeating the test but instead having both Message A and B go from the Linux
QM to the mainframe QM over a SNDR channel with convert set to NO has the
messages looking exactly the same as when they were at rest in a local queue
on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and
repeat the test.
*Message A* now has an Encoding of 785 and a CCSID of 500. The first line of
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
*Message B* now also has an Encoding of 785 and a CCSID of 500. The first line
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B in the
data payload, but the MQIIH looks the same. So the MQIIH header is getting
described properly by the MQMD Encoding and thus being converted properly. The
message payload beyond the MQIIH is potentially not being described properly
in one of these cases.
OK, lets see how the IMS application deals with this. Datapower connects in
client mode to that Linux Queue Manager putting to a remote q that aims at the
mainframe over a SNDR channel with Convert set to NO.
Message A causes an Abend and 3 MQ replies come back from the OTMA bridge.
Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE
SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.
I set the SND channel to convert, restart the channel and repeat the test. No
change – Message A causes an Abend with 3 replies and Message B works correctly.
So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload
of the app data look exactly the same coming out of Datapower regardless of
the Encoding, but after translation they look different when compared to each
other, that says to me one of the Encodings is not describing the data
correctly on output. Based on testing it would seem that the 546 Encoding does
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and
Windows, and 273 for Unix. My testing seems to indicate that 273 is correct
for DataPower and 546 is incorrect. If true, is this a problem in the
DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into
this firmware version of DataPower? Maybe its picking up a Linux Encoding
value, maybe from the Linux QM its connected to? Picking up the queue
manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding
when asking for the default. They should get the encoding of THEIR platform
(not the QM’s) because THEY are producing the bytes in the message. Or maybe
the WTX map is getting in the way and producing the data in a 273 encoding
when it should be a 546 encoding?
As a test we connected Datapower directly to a z/OS Queue manager that has an
Encoding of 785. DataPower produced a message without setting the MQMD
Encoding and the message landed in the queue with an MQMD encoding of 546
again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager.
Putting the message while connected to the z/OS QM and specifying the 273
encoding also produced the same message and MQIIH as Message B above.
I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is
populating the MQMD.Encoding with 546 if allowed to default. The encoding of
the MQIIH header is produced to match this 546 encoding, but the message
payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD
default to match the encoding of the data being produced by the platform? If
yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to
IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the
MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack
work around that will byte us in the future.
**
**
*Peter Potkay*
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 11:13 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
That is a good idea Art. I’ll set up a separate path in the test environment
and have the SNDR channel on the Linux QM do the convert. We’ll have the DP
appliance comment out the part where they set the MQMD’s Encoding to 273 and
let it default to 546. And then we’ll see what the message looks like when it
arrives on a plain local queue on the mainframe side. If it arrives with a 273
encoding and the endian bits flipped around correctly this will point to their
being a problem on the mainframe side with conversion of a message with 546
encoding.
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 10:32 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic
from other non-OTMA traffic was the best for all involved. This allowed us to
use the channel/MCA to do the conversion, as the msgs will go immediately from
the receiving MCA, to the queue defined with the XCF Storage Class, and across
the OTMA bridge into IMS – hence the comment about no ‘application’ having the
ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not
requiring those applications to do anything ‘special’ to generate the msgs –
just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your
non-OTMA traffic…or at least run a quick test w/ a new channel has CONVERT=YES
set.
Cheers,
Art
--------------------------------------------------------------------------------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 10:09 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Hi Art,
The request message in this case does have an MQIIH.Format of
MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546
causes issues, while a value of 273 works OK. In either case the CCSID of 819
seems to be dealt with correctly for the character portion of the message.
With a 546 encoding the program pulling the messages of the IMS queue abends
complaining about missing or incomplete segments. I think because the LL
portion of the LLZZ, that describes the length, is not interpreted correctly
with an MQMD.Encoding of 546.
Setting the QM to QM channel to convert is not something I want to entertain.
There are tons of applications sharing this path between mid tier and z/OS and
many of them do not use the OTMA Bridge, and some successfully do.
·You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic
from distributed to z/OS”. Can you expand on that – are you putting the onus
on the mid tier app to produce an EBCIDIC request message?
I’m searching trying to get a clear answer on how messages from a distributed
queue manager arriving on a z/OS queue manager’s OTMA queue get converted.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
/“The data conversion is performed by either the distributed queuing facility
( which may call any necessary exits ) or by the intra group queuing agent (
which does not support the use of exits ) when it puts a message to a
destination queue that has XCF information defined for its storage class.”/
//
/“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a
message….”/
I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to
know that it must do some conversion if an incoming message bound for an MQ
queue defined as an OTMA Bridge queue. And apparently it is not doing it
correctly or at all for an encoding of 546 but since the 273 encoding is
mainframe friendly (assumption on my part) it works. Further assumption is
that it has no issues converting the character data from CCSID 819 of the
request message to the CCSID 500 of our mainframe QM.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm
“•/Applications that connect to other queue managers can provide an MQIIH
structure that is in any of the supported character sets and encodings;
conversion of the MQIIH is performed by the receiving message channel agent
connected to the queue manager that owns the IMS bridge queue. /
/Note: There is one exception to this. If the queue manager that owns the IMS
bridge queue is using CICS® for distributed queuing, the MQIIH must be in the
character set and encoding of the queue manager that owns the IMS bridge queue/.”
Further evidence that the RCVR MCA should be doing this. Guess the question on
the table is if 546 is a “supported encoding”.
I don’t know what “/If the queue manager that owns the IMS bridge queue is
using CICS® for distributed queuing/” means. We do have CICS attached to this
mainframe queue manager and unrelated incoming MQ messages do trigger some
CICS transactions. But I’m going to guess this is not an issue because the
character portion of the messages that we send to the bridge queue is in an
819 CCSID and it is being dealt with.
Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager
is not dealing with a 546 encoding correctly?
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 8:57 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Resending to correct horrible formatting of previous response and to add
comment about channel conversion…
Peter -
·Use the MQIMSVS format for msgs destined for the OTMA bridge.
(http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
·Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it
is part of the payload or user data portion of the message.
·Messages need to be in the expected format for IMS to successfully process
them: LLZZ TRANCODE DATA
·We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from
distributed to z/OS
·Enable character set conversion in the channel via the CONVERT=YES parameter
in your channel definition. Since there is no application prior to the OTMA
bridge doing an 'MQGET', let the channel do the work.
These are some of the 'gotchas' that I have come across and should get you
going in the right direction.
Good Luck!
Art
Image removed by sender.
Image removed by sender.
*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Dominique Courtois
2013-06-19 22:28:19 UTC
Permalink
Peter,
To help understand can you answer this ?
The first "field" of the payload seems to be an integer. Is that true ? And what is
the intended decimal value ?
If so, understanding how these 4 bytes can be 0D40000 in message A and
00170000 in message B will probably help to understand the whole thing.

Dominique

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Meekin, Paul
2013-06-20 07:44:15 UTC
Permalink
Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-20 11:55:49 UTC
Permalink
Darren,
MQ Clients can use "qmgr default" for things like CCSID.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQCCSI_.htm

Notice both MQCCSI_DEFAULT and MQCCSI_Q_MGR have the same value of 0.

When an MQ Client says give me the default, the MQ Client libraries are supposed to take precedence and insure that the MQMD is populated with the CCSID and Encoding values appropriate for the platform where the client is executing, not for the platform where the connected to queue manager is executing. This is appropriate because the data is being produced on the client's platform and thus can only be accurately described by an CCSID / Encoding for that platform. If its doing nothing special. Some client apps have the ability to produce data in a format other than what you would expect coming from that client platform, in which case its on the client app to provide the values for the MQMD on the MQPUT. The client libraries don't try and interpret the data.

I suspected that this might be the problem. That maybe the client on the datapower appliance was incorrectly using the Linux QM's encoding. As a test we connected datapower directly to the mainframe QM and wonder if the message would get the MQMD.encoding set to 785. It did not, it again was 546. Maybe the correct encoding default for DataPower is 546. Maybe the mystery chips inside that locked appliance chassis are x86 Intels.

Back to my problem, that's my challenge now - exactly what is the proper default encoding for a DataPower XI50 appliance. I'm going to open a PMR to find out. Searches on Google and Infocenters haven't found me an answer

Then I need to understand if the DataPower Service producing the application data that follows the MQIIH is doing anything special. It’s a WTX Map that is producing the app data and I wonder if it isn't being slick and overly helpful producing the data in an Encoding appropriate for the destination which in this case it knows is the EBCDIC Big Endian mainframe. If true, and if this Encoding is different than the default for DataPower we got our answer. I have reached out to the developer responsible for that WTX Map asking if he is doing anything related to encoding.

Currently if the DataPower Service doesn't specify the MQMD Encoding the MQMD ends up with 546 as the Encoding and the MQIIH header bytes match (little endian). If the service specifies 273, the MQMD ends up with 273 for the Encoding and the MQIIH header bytes matches that (big endian). But in either case the app data that follows stays the same and in a format that pukes when tagged as 546, and works when tagged as 273.

Interestingly the MQIIH has an encoding field and ccsid field but they are both ignored, as documented.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This is contrary to other header types where the MQMD describes just the next header, and the next header's encoding / ccsid then describes whatever follows it, be it another header or app data.



Peter Potkay

-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Darren Douch
Sent: Wednesday, June 19, 2013 5:58 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Fairly certain that there have also been issues in the past with MQ client builds not setting endian-ness correctly, although of course it can be tricky if a client app is on one platform and the qmgr it is connecting to is on another ... using qmgr_default would likely be incorrect in that case and the client app would have to be a little 'smarter'.

Darren
Post by Tim Zielke
A few other thoughts.
Are you able to leverage an MQ Client trace on the DataPower MQ Client
7.0.1.1 server to see what the relevant values are before it is sent
to the Red Hat Linux QM? That might provide some further clues.
Looking at this doc on Encoding in the manual, ->
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.d
oc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%6
3%6f%64%22%20
it seems to say if I am reading it correctly that a decimal value of
546 which they call "Linux or Windows" is integer reverse or little
endian. And 273 which they call "IBM I or Unix" is integer normal or
big endian. So to me, that would explain the behavior you are seeing
with the multi-byte binary values in the MQIIH appearing as little
endian (with 546) and big endian (with 273). If the message data is a
string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.
It might be more semantics, but I do not understand why they refer to
Linux as little endian. Linux can run on either big (Sparc) or little
(x86) endian processors and Linux itself does not have an endianness.
It just matches the endianness for the CPU it will run on top of. So
to me, those labels are confusing and misleading.
Thanks,
Tim
*From:*Tim Zielke
*Sent:* Wednesday, June 19, 2013 1:58 PM
*Subject:* RE: DataPower, Encoding and the OTMA Bridge
Hi Peter,
For those examples where you list the DataPower MQ Client and Red Hat
Linux QM, can you also provide what CPU model (i.e. x86, Sparc, etc.)
that the server is using? My understanding is endianness is
determined by the CPU hardware not the operating system, so I am
curious what CPU hardware is being used.
Thanks,
Tim
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Wednesday, June 19, 2013 11:18 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
*Message A*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ
7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The
message ends up with an Encoding of 546, the CCSID is 819. The app
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.
dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader
_concept
The first line of the MQIIH is as follows. This is a copy and paste
from BMTM looking at the data with the Text and Hex columns turned on.
*Code:*
I I H T 49494820 01000000 54000000 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
*Message B*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ
7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message
ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex.
Notice the difference in endianess of the 2nd and 3rd block of data
when compared to Message A.
*Code:*
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows.
Notice the bytes are exactly the same when compared to Message A, but
the MQMD has a different Encoding describing these exact bytes. Uh oh,
you can see there is going to be a conversion issue.
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding
header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the
bytes are produced in the MQIIH Header, but it is not having an effect
on the bytes in the message payload?
Repeating the test but instead having both Message A and B go from the
Linux QM to the mainframe QM over a SNDR channel with convert set to
NO has the messages looking exactly the same as when they were at rest
in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes
and repeat the test.
*Message A* now has an Encoding of 785 and a CCSID of 500. The first
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
*Message B* now also has an Encoding of 785 and a CCSID of 500. The
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B
in the data payload, but the MQIIH looks the same. So the MQIIH header
is getting described properly by the MQMD Encoding and thus being
converted properly. The message payload beyond the MQIIH is
potentially not being described properly in one of these cases.
OK, lets see how the IMS application deals with this. Datapower
connects in client mode to that Linux Queue Manager putting to a
remote q that aims at the mainframe over a SNDR channel with Convert set to NO.
Message A causes an Abend and 3 MQ replies come back from the OTMA bridge.
Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED
AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.
I set the SND channel to convert, restart the channel and repeat the
test. No change – Message A causes an Abend with 3 replies and Message B works correctly.
So, I’m open to opinions, but here’s where I’m at. If the bytes in the
payload of the app data look exactly the same coming out of Datapower
regardless of the Encoding, but after translation they look different
when compared to each other, that says to me one of the Encodings is
not describing the data correctly on output. Based on testing it would
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for
Linux and Windows, and 273 for Unix. My testing seems to indicate that
273 is correct for DataPower and 546 is incorrect. If true, is this a
problem in the DataPower layer, or perhaps in the MQ Client version
(7.1.0.1) loaded into this firmware version of DataPower? Maybe its
picking up a Linux Encoding value, maybe from the Linux QM its
connected to? Picking up the queue manager’s encoding is contrary to
how MQ Clients should set an MQMD Encoding when asking for the
default. They should get the encoding of THEIR platform (not the QM’s)
because THEY are producing the bytes in the message. Or maybe the WTX
map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?
As a test we connected Datapower directly to a z/OS Queue manager that
has an Encoding of 785. DataPower produced a message without setting
the MQMD Encoding and the message landed in the queue with an MQMD
encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager.
Putting the message while connected to the z/OS QM and specifying the
273 encoding also produced the same message and MQIIH as Message B above.
I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance
is populating the MQMD.Encoding with 546 if allowed to default. The
encoding of the MQIIH header is produced to match this 546 encoding,
but the message payload produced needs an encoding of 273. Shouldn’t
the encoding in the MQMD default to match the encoding of the data
being produced by the platform? If yes, is this a problem worthy of a
PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or
IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273
on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.
**
**
*Peter Potkay*
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 11:13 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
That is a good idea Art. I’ll set up a separate path in the test
environment and have the SNDR channel on the Linux QM do the convert.
We’ll have the DP appliance comment out the part where they set the
MQMD’s Encoding to 273 and let it default to 546. And then we’ll see
what the message looks like when it arrives on a plain local queue on
the mainframe side. If it arrives with a 273 encoding and the endian
bits flipped around correctly this will point to their being a problem
on the mainframe side with conversion of a message with 546 encoding.
*Peter Potkay*
Behalf Of *Schanz, Arthur
*Sent:* Monday, June 17, 2013 10:32 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
We found early on in our OTMA ‘journey’ that separating the OTMA-bound
traffic from other non-OTMA traffic was the best for all involved.
This allowed us to use the channel/MCA to do the conversion, as the
msgs will go immediately from the receiving MCA, to the queue defined
with the XCF Storage Class, and across the OTMA bridge into IMS –
hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We
are not requiring those applications to do anything ‘special’ to
generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from
your non-OTMA traffic…or at least run a quick test w/ a new channel
has CONVERT=YES set.
Cheers,
Art
----------------------------------------------------------------------
----------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 10:09 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Hi Art,
The request message in this case does have an MQIIH.Format of
MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of
546 causes issues, while a value of 273 works OK. In either case the
CCSID of 819 seems to be dealt with correctly for the character portion of the message.
With a 546 encoding the program pulling the messages of the IMS queue
abends complaining about missing or incomplete segments. I think
because the LL portion of the LLZZ, that describes the length, is not
interpreted correctly with an MQMD.Encoding of 546.
Setting the QM to QM channel to convert is not something I want to entertain.
There are tons of applications sharing this path between mid tier and
z/OS and many of them do not use the OTMA Bridge, and some successfully do.
·You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our
traffic from distributed to z/OS”. Can you expand on that – are you
putting the onus on the mid tier app to produce an EBCIDIC request message?
I’m searching trying to get a clear answer on how messages from a
distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzal.doc/fg15970_.htm
/“The data conversion is performed by either the distributed queuing
facility ( which may call any necessary exits ) or by the intra group
queuing agent ( which does not support the use of exits ) when it puts
a message to a destination queue that has XCF information defined for
its storage class.”/
//
/“Because the WebSphere MQ-IMS bridge does not convert messages when
it gets a message….”/
I guess this is saying the RCVR MCA on a z/OS queue manager is slick
enough to know that it must do some conversion if an incoming message
bound for an MQ queue defined as an OTMA Bridge queue. And apparently
it is not doing it correctly or at all for an encoding of 546 but
since the 273 encoding is mainframe friendly (assumption on my part)
it works. Further assumption is that it has no issues converting the
character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.a
mqwak.doc/ir11680_.htm
“•/Applications that connect to other queue managers can provide an
MQIIH structure that is in any of the supported character sets and
encodings; conversion of the MQIIH is performed by the receiving
message channel agent connected to the queue manager that owns the IMS
bridge queue. /
/Note: There is one exception to this. If the queue manager that owns
the IMS bridge queue is using CICS® for distributed queuing, the MQIIH
must be in the character set and encoding of the queue manager that owns the IMS bridge queue/.”
Further evidence that the RCVR MCA should be doing this. Guess the
question on the table is if 546 is a “supported encoding”.
I don’t know what “/If the queue manager that owns the IMS bridge
queue is using CICS® for distributed queuing/” means. We do have CICS
attached to this mainframe queue manager and unrelated incoming MQ
messages do trigger some CICS transactions. But I’m going to guess
this is not an issue because the character portion of the messages
that we send to the bridge queue is in an
819 CCSID and it is being dealt with.
Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue
Manager is not dealing with a 546 encoding correctly?
*Peter Potkay*
Behalf Of *Schanz, Arthur
*Sent:* Monday, June 17, 2013 8:57 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Resending to correct horrible formatting of previous response and to
add comment about channel conversion…
Peter -
·Use the MQIMSVS format for msgs destined for the OTMA bridge.
(http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
·Remember that the MQIIH structure is fixed length (84 bytes, or
x'54') and it is part of the payload or user data portion of the message.
·Messages need to be in the expected format for IMS to successfully
process
them: LLZZ TRANCODE DATA
·We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from
distributed to z/OS
·Enable character set conversion in the channel via the CONVERT=YES
parameter in your channel definition. Since there is no application
prior to the OTMA bridge doing an 'MQGET', let the channel do the work.
These are some of the 'gotchas' that I have come across and should get
you going in the right direction.
Good Luck!
Art
Image removed by sender.
Image removed by sender.
*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
**************************************
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-20 12:05:32 UTC
Permalink
Dominique,
The difference in those first 4 bytes is only there after an MQ conversion, in my test by a SNDR channel on a RHEL 5.8 server running MQ 7.0.1.6. Before the conversion those bytes are exactly the same between message A and B. To me that says those bytes are only properly described by one of the Encoding values, while the other encoding value in the MQMD ends up being incorrect, causing the conversion process to interpret the incoming data incorrectly and producing garbage.

Peter Potkay


-----Original Message-----
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Dominique Courtois
Sent: Wednesday, June 19, 2013 6:28 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter,
To help understand can you answer this ?
The first "field" of the payload seems to be an integer. Is that true ? And what is the intended decimal value ?
If so, understanding how these 4 bytes can be 0D40000 in message A and
00170000 in message B will probably help to understand the whole thing.

Dominique

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-20 12:12:45 UTC
Permalink
Tim / Paul,
The intermediate QM in our case is running on a server with x86-64 chips. At this point I don’t suspect the MQ Client is incorrectly tagging the client produced data with the QM’s CCSID / Encoding. We switched the client connection directly to a QM running on a different encoding (z/OS) and the message still ended up with a default of 546, rather than 785. I will be opening a PMR to confirm, but I bet this means the chips inside the DataPower appliance are x86, a.k.a “Windows / Linux” encoding.

Then I’ll have to determine if the WTX Map running on DataPower is producing the app data that follows the MQIIH in an Encoding that does not match the default for the appliance. As that message is not pure string data, the Encoding of the data and the value in the MQMD Encoding that describes it is crucial.


Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 3:44 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-20 12:35:14 UTC
Permalink

” I think you can agree that the CONVERT=YES is the way to go”

Nope ☺

I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.

In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.


I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.


But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.


Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Wednesday, June 19, 2013 4:06 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –


· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:

<!-- Create MQIIH header to prefix the message data -->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>

This is what occurs, based on that setting:

[cid:***@01CE6D8F.AAC10350]


· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.

Put these together and it is obvious that supplying the correct Encoding value should do the trick.

Art

________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6D8F.AAC10350]

[cid:***@01CE6D8F.AAC10350]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Tim Zielke
2013-06-20 13:08:59 UTC
Permalink
Hi Paul,

I would think the same would apply for the Unix label for 273 encoding. Solaris on Sparc is big endian and Solaris on x86 should be little endian. We don't have a Solaris x86 to confirm.

For the string comment, I was making that thinking the data was 819 which is a single byte code page. But even for a multi-byte code page like 1208, I would assume for a STRING format message that this would be stored internally as a character string so endianness would not be at play. Maybe I am misunderstanding your comment or wrong in my assumptions.

And at the risk of being pedantic, I don't like the terms of NORMAL and REVERSED (i.e. INTEGER_NORMAL and INTEGER_REVERSED) in that doc. If you asked an x86 assembler program what is "normal" endianness, he/she would probably say little endian. If you asked an MVS assembler programmer what is "normal" endiannes, he/she would probably say big endian. I understand this comes down at some level to semantics, but the whole point of the term endianness is that the byte order is arbitrary. The term comes from the book Gulliver's Travels where the Lilliputians were disputing what was the correct end of an egg to crack first. Those who favored the big end of the egg were big-endian, and those who favored the small end were little-endian.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 2:44 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
Bob Juch
2013-06-20 13:31:09 UTC
Permalink
Tim,

They must have SPARCs in Blefuscu.

Bob Juch
Juch Services LLC
Post by Tim Zielke
Hi Paul,
I would think the same would apply for the Unix label for 273 encoding.
Solaris on Sparc is big endian and Solaris on x86 should be little endian.
We don't have a Solaris x86 to confirm.
For the string comment, I was making that thinking the data was 819 which is
a single byte code page. But even for a multi-byte code page like 1208, I
would assume for a STRING format message that this would be stored
internally as a character string so endianness would not be at play. Maybe
I am misunderstanding your comment or wrong in my assumptions.
And at the risk of being pedantic, I don't like the terms of NORMAL and
REVERSED (i.e. INTEGER_NORMAL and INTEGER_REVERSED) in that doc. If you
asked an x86 assembler program what is "normal" endianness, he/she would
probably say little endian. If you asked an MVS assembler programmer what
is "normal" endiannes, he/she would probably say big endian. I understand
this comes down at some level to semantics, but the whole point of the term
endianness is that the byte order is arbitrary. The term comes from the
book Gulliver's Travels where the Lilliputians were disputing what was the
correct end of an egg to crack first. Those who favored the big end of the
egg were big-endian, and those who favored the small end were little-endian.
Thanks,
Tim
Meekin, Paul
Sent: Thursday, June 20, 2013 2:44 AM
Subject: Re: DataPower, Encoding and the OTMA Bridge
Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and
/* Encoding */
#define MQENC_NATIVE 0x00000222
/* Encoding */
#define MQENC_NATIVE 0x00000111
As most people run Linux on x86 arch I guess they’re just being a bit lazy
in the docs.
Also with regard to the comment about strings, don’t forget that some
multi-byte character sets are sensitive to byte order which is often (but
not always) associated with the encoding value.
Cheers,
Paul
Tim Zielke
Sent: 19 June 2013 21:11
Subject: Re: DataPower, Encoding and the OTMA Bridge
A few other thoughts.
Are you able to leverage an MQ Client trace on the DataPower MQ Client
7.0.1.1 server to see what the relevant values are before it is sent to the
Red Hat Linux QM? That might provide some further clues.
Looking at this doc on Encoding in the manual, ->
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20
it seems to say if I am reading it correctly that a decimal value of 546
which they call "Linux or Windows" is integer reverse or little endian. And
273 which they call "IBM I or Unix" is integer normal or big endian. So to
me, that would explain the behavior you are seeing with the multi-byte
binary values in the MQIIH appearing as little endian (with 546) and big
endian (with 273). If the message data is a string, there would be no
alteration between little endian and big endian, as each byte is treated as
a separate byte.
It might be more semantics, but I do not understand why they refer to Linux
as little endian. Linux can run on either big (Sparc) or little (x86)
endian processors and Linux itself does not have an endianness. It just
matches the endianness for the CPU it will run on top of. So to me, those
labels are confusing and misleading.
Thanks,
Tim
***************************************
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Meekin, Paul
2013-06-20 15:04:57 UTC
Permalink
Hi Tim,

Yes, for a single byte character set like 819 you are correct that there is no concern over byte/bit orders. Also, even though 1208 (UTF-8) is a multi-byte character set, it is stream-oriented so again there is no byte order to worry about.

My thoughts were more with things like UTF-16 in which byte order *is* important. I have seen for example a .NET program sending UTF-16 using “big-endian” byte order and Solaris on SPARC expecting it to be in “little-endian”
 or was it the other way around? Anyway
 it turns out you can specify different CCSIDs for UTF-16 that also incorporate the byte order or you can use special characters embedded in the message to give a hint etc.

But really it’s all a big mess and I blame Jonathan Swift for the whole thing!

_______________________________________
Paul Meekin
CATE CitiCloud & CitiApp Platform Engineering | Messaging Middleware
33 Canada Square, Canary Wharf, London E14 5LB
• +44 207 500 6318 | • ***@citi.com<mailto:***@citi.com>

Find out more about our Services<https://catecollaboration.citigroup.net/domains/deveng/Pages/default.aspx>

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 20 June 2013 14:09
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Paul,

I would think the same would apply for the Unix label for 273 encoding. Solaris on Sparc is big endian and Solaris on x86 should be little endian. We don't have a Solaris x86 to confirm.

For the string comment, I was making that thinking the data was 819 which is a single byte code page. But even for a multi-byte code page like 1208, I would assume for a STRING format message that this would be stored internally as a character string so endianness would not be at play. Maybe I am misunderstanding your comment or wrong in my assumptions.

And at the risk of being pedantic, I don't like the terms of NORMAL and REVERSED (i.e. INTEGER_NORMAL and INTEGER_REVERSED) in that doc. If you asked an x86 assembler program what is "normal" endianness, he/she would probably say little endian. If you asked an MVS assembler programmer what is "normal" endiannes, he/she would probably say big endian. I understand this comes down at some level to semantics, but the whole point of the term endianness is that the byte order is arbitrary. The term comes from the book Gulliver's Travels where the Lilliputians were disputing what was the correct end of an egg to crack first. Those who favored the big end of the egg were big-endian, and those who favored the small end were little-endian.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 2:44 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
Tim Zielke
2013-06-20 16:37:11 UTC
Permalink
Thanks for the info on UTF-16. Solaris SPARC is big-endian, at least at our shop :-).

In that MQ Encoding document, there is also the encoding 17 which is Micro Focus COBOL on Windows. It seems to say that this one is big-endian, even though it is running on a little endian processor (I assume Windows implies x86). So for this case, Micro Focus COBOL is intentionally flipping the bytes around on multi-byte binary data so that it will appear as big-endian on a little-endian machine? I did a little research on Micro Focus COBOL and saw some mention that seemed to imply that. Crazy!


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 10:05 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Tim,

Yes, for a single byte character set like 819 you are correct that there is no concern over byte/bit orders. Also, even though 1208 (UTF-8) is a multi-byte character set, it is stream-oriented so again there is no byte order to worry about.

My thoughts were more with things like UTF-16 in which byte order *is* important. I have seen for example a .NET program sending UTF-16 using “big-endian” byte order and Solaris on SPARC expecting it to be in “little-endian”
 or was it the other way around? Anyway
 it turns out you can specify different CCSIDs for UTF-16 that also incorporate the byte order or you can use special characters embedded in the message to give a hint etc.

But really it’s all a big mess and I blame Jonathan Swift for the whole thing!

_______________________________________
Paul Meekin
CATE CitiCloud & CitiApp Platform Engineering | Messaging Middleware
33 Canada Square, Canary Wharf, London E14 5LB
• +44 207 500 6318 | • ***@citi.com<mailto:***@citi.com>

Find out more about our Services<https://catecollaboration.citigroup.net/domains/deveng/Pages/default.aspx>

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 20 June 2013 14:09
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Paul,

I would think the same would apply for the Unix label for 273 encoding. Solaris on Sparc is big endian and Solaris on x86 should be little endian. We don't have a Solaris x86 to confirm.

For the string comment, I was making that thinking the data was 819 which is a single byte code page. But even for a multi-byte code page like 1208, I would assume for a STRING format message that this would be stored internally as a character string so endianness would not be at play. Maybe I am misunderstanding your comment or wrong in my assumptions.

And at the risk of being pedantic, I don't like the terms of NORMAL and REVERSED (i.e. INTEGER_NORMAL and INTEGER_REVERSED) in that doc. If you asked an x86 assembler program what is "normal" endianness, he/she would probably say little endian. If you asked an MVS assembler programmer what is "normal" endiannes, he/she would probably say big endian. I understand this comes down at some level to semantics, but the whole point of the term endianness is that the byte order is arbitrary. The term comes from the book Gulliver's Travels where the Lilliputians were disputing what was the correct end of an egg to crack first. Those who favored the big end of the egg were big-endian, and those who favored the small end were little-endian.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 2:44 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-20 16:59:22 UTC
Permalink
“So for this case, Micro Focus COBOL is intentionally flipping the bytes around on multi-byte binary data so that it will appear as big-endian on a little-endian machine? I did a little research on Micro Focus COBOL and saw some mention that seemed to imply that. Crazy!”

Oh yeah, we went nuts figuring that one out years ago when we started using their mainframe emulation tool that was MQ client connecting from a Windows desktop to a remote QM. It seems obvious now, but we had to specify the MQMD.CCSID as 500 on the MQPUTs because the MQ Client was just doing its thing tagging the messages as CCSID 437 since we were letting it default – it had no way to know that app on the Windows server was producing EBCDIC data!


Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: Thursday, June 20, 2013 12:37 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Thanks for the info on UTF-16. Solaris SPARC is big-endian, at least at our shop :-).

In that MQ Encoding document, there is also the encoding 17 which is Micro Focus COBOL on Windows. It seems to say that this one is big-endian, even though it is running on a little endian processor (I assume Windows implies x86). So for this case, Micro Focus COBOL is intentionally flipping the bytes around on multi-byte binary data so that it will appear as big-endian on a little-endian machine? I did a little research on Micro Focus COBOL and saw some mention that seemed to imply that. Crazy!


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 10:05 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Tim,

Yes, for a single byte character set like 819 you are correct that there is no concern over byte/bit orders. Also, even though 1208 (UTF-8) is a multi-byte character set, it is stream-oriented so again there is no byte order to worry about.

My thoughts were more with things like UTF-16 in which byte order *is* important. I have seen for example a .NET program sending UTF-16 using “big-endian” byte order and Solaris on SPARC expecting it to be in “little-endian”
 or was it the other way around? Anyway
 it turns out you can specify different CCSIDs for UTF-16 that also incorporate the byte order or you can use special characters embedded in the message to give a hint etc.

But really it’s all a big mess and I blame Jonathan Swift for the whole thing!

_______________________________________
Paul Meekin
CATE CitiCloud & CitiApp Platform Engineering | Messaging Middleware
33 Canada Square, Canary Wharf, London E14 5LB
• +44 207 500 6318 | • ***@citi.com<mailto:***@citi.com>

Find out more about our Services<https://catecollaboration.citigroup.net/domains/deveng/Pages/default.aspx>

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 20 June 2013 14:09
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Paul,

I would think the same would apply for the Unix label for 273 encoding. Solaris on Sparc is big endian and Solaris on x86 should be little endian. We don't have a Solaris x86 to confirm.

For the string comment, I was making that thinking the data was 819 which is a single byte code page. But even for a multi-byte code page like 1208, I would assume for a STRING format message that this would be stored internally as a character string so endianness would not be at play. Maybe I am misunderstanding your comment or wrong in my assumptions.

And at the risk of being pedantic, I don't like the terms of NORMAL and REVERSED (i.e. INTEGER_NORMAL and INTEGER_REVERSED) in that doc. If you asked an x86 assembler program what is "normal" endianness, he/she would probably say little endian. If you asked an MVS assembler programmer what is "normal" endiannes, he/she would probably say big endian. I understand this comes down at some level to semantics, but the whole point of the term endianness is that the byte order is arbitrary. The term comes from the book Gulliver's Travels where the Lilliputians were disputing what was the correct end of an egg to crack first. Those who favored the big end of the egg were big-endian, and those who favored the small end were little-endian.

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Meekin, Paul
Sent: Thursday, June 20, 2013 2:44 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Indeed – I just took a look at RedHat Linux on both x86_64 and z systems and got this:

x86_64:
/* Encoding */
#define MQENC_NATIVE 0x00000222

z:
/* Encoding */
#define MQENC_NATIVE 0x00000111

As most people run Linux on x86 arch I guess they’re just being a bit lazy in the docs.

Also with regard to the comment about strings, don’t forget that some multi-byte character sets are sensitive to byte order which is often (but not always) associated with the encoding value.

Cheers,
Paul

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: 19 June 2013 21:11
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

A few other thoughts.

Are you able to leverage an MQ Client trace on the DataPower MQ Client 7.0.1.1 server to see what the relevant values are before it is sent to the Red Hat Linux QM? That might provide some further clues.

Looking at this doc on Encoding in the manual, -> http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/topic/com.ibm.mq.doc/fc_MQENC_.htm?resultof=%22%65%6e%63%6f%64%69%6e%67%22%20%22%65%6e%63%6f%64%22%20

it seems to say if I am reading it correctly that a decimal value of 546 which they call "Linux or Windows" is integer reverse or little endian. And 273 which they call "IBM I or Unix" is integer normal or big endian. So to me, that would explain the behavior you are seeing with the multi-byte binary values in the MQIIH appearing as little endian (with 546) and big endian (with 273). If the message data is a string, there would be no alteration between little endian and big endian, as each byte is treated as a separate byte.

It might be more semantics, but I do not understand why they refer to Linux as little endian. Linux can run on either big (Sparc) or little (x86) endian processors and Linux itself does not have an endianness. It just matches the endianness for the CPU it will run on top of. So to me, those labels are confusing and misleading.

Thanks,
Tim


***************************************
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Cameron Conacher
2013-06-20 17:24:48 UTC
Permalink
I was taught that when you do a PUT you tell them the CCSID that you have
And when you do a GET you do a GET-WITH-CONVERT and tell them what CCSID you want
And then magically things work out fine.

Sent from my iPhone
Post by Potkay, Peter M (CTO Architecture + Engineering)

” I think you can agree that the CONVERT=YES is the way to go”
Nope J
I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.
In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.
I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.
But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.
Peter Potkay
Sent: Wednesday, June 19, 2013 4:06 PM
Subject: Re: DataPower, Encoding and the OTMA Bridge
Peter –
· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.
<!-- Create MQIIH header to prefix the message data -->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>
<image008.png>
· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.
Put these together and it is obvious that supplying the correct Encoding value should do the trick.
Art
<image009.png>Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
<image010.gif>
<image011.jpg>
Sent: Wednesday, June 19, 2013 12:18 PM
Subject: Re: DataPower, Encoding and the OTMA Bridge
Message A
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
I I H T 49494820 01000000 54000000 00000000
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?
Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.
I I H Ú C9C9C840 00000001 00000054 00000000
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
I I H Ú C9C9C840 00000001 00000054 00000000
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The mes
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Schanz, Arthur
2013-06-20 18:00:27 UTC
Permalink
Unfortunately, it is not possible to do a GET-WITH-CONVERT when msgs are destined for OTMA, as there is no ‘application’ that is involved prior to the msgs going across the Bridge. This is the reason that character conversion needs to be done by the MCA, if required.

________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Cameron Conacher
Sent: Thursday, June 20, 2013 1:25 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

I was taught that when you do a PUT you tell them the CCSID that you have
And when you do a GET you do a GET-WITH-CONVERT and tell them what CCSID you want
And then magically things work out fine.

Sent from my iPhone

On 2013-06-20, at 8:35 AM, "Potkay, Peter M (CTO Architecture + Engineering)" <***@THEHARTFORD.COM<mailto:***@THEHARTFORD.COM>> wrote:

” I think you can agree that the CONVERT=YES is the way to go”

Nope ☺

I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.

In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.


I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.


But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.


Peter Potkay



From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Wednesday, June 19, 2013 4:06 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –


· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:

<!-- Create MQIIH header to prefix the message data -->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>

This is what occurs, based on that setting:

<image008.png>


· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.

Put these together and it is obvious that supplying the correct Encoding value should do the trick.

Art

________________________________
<image009.png>Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



<image010.gif>

<image011.jpg>

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The mes

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-21 15:06:39 UTC
Permalink
Here is the end result for this problem and solution.

Problem Summary:
Messages sent from Datapower via MQ to an OTMA Bridge queue on the mainframe were causing the IMS transaction to abend.

Solution:
By populating the MQMD.Encoding field in the MQ message to 273 the abends stopped and a good reply came back from IMS. We figured this out last Friday, the question was why did this work. Was it a proper solution, or a hack to get around a bug and the hack solution might itself break in the future? We now know this is the right solution.


1. WTX Developer A was using a WTX Map to create the application specific message payload in the MQ message. He was referring to how another app first did it in their Java code years ago to understand how to lay the data out.

2. Datapower Developer B was creating the MQMD header and the MQIIH header, appending WTX Developer A’s app data and sending it to the MQ queue.

3. Developer B was not specifying the MQMD Encoding or the MQMD CCSID fields when creating the message. I consider this is normal. In general you want to allow these fields to default because by default the MQ Client libraries will correctly identify the platform they are executing on and will fill in the Encoding and CCSID appropriate for the client platform. In this case the client platform is Datapower and the default encoding value is 546 (little endian based on most likely x86 chips) and the default encoding is 819 (a Unix variant), so that’s what the default values ended up being.

4. The encoding value is meant to describe the non character data like integer bytes, and the CCSID describes the character data.

5. We now had an MQ message where the MQMD header had MQMD.Encoding 546 and MQMD.CCSID 819.

6. The MQIIH header that follows the MQMD was built to match whatever the MQMD said. So the MQIIH’s character data was in the 819 code page. The MQIIH also happens to have some integer byte fields, so the encoding value in the header is relevant. The bytes were created to match the MQMD.Encoding value of 546, so they were in little endian format. So far so code.

7. While the MQIIH has its own encoding and CCSID fields, they are not used for anything. This is documented in the MQ manuals. This is contrary to other types of headers like an RFH2 header, where the MQMD describes the format of the RFH2, and then the RFH2 fields describe what follows it, usually the app data. So the MQIIH and the app data that follows it both need to be in the same encoding and CCSID.

8. In the application data created by the WTX Map, there was character data. The WTX Map asked for “Native” data character set, so the character data was produced in a character set appropriate for the executing platform (DataPower) and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.

9. In the application data created by the WTX Map, there were also some binary integer fields in the data. This is not common at all but these types of fields are required when sending to IMS via the OTMA bridge. The WTX Map asked for the Byte Order of these fields to be “Big Endian” (based on the UCFE model in step 1) and so the data was produced in a big endian format. We now a message payload where some of the fields are in big endian, but the MQMD.Encoding value is little endian (546). This is what causes the abends on the mainframe. Some of the data in the payload is not described correctly by the header in this scenario and the next app that tries to MQ convert this data (the RCVR MCA on the mainframe QM in this case) ends up with some of the fields completely garbled.

10. When Developer B hard coded the MQMD.Encoding field to 273 (big endian) two things occurred. The MQIIH header was created with its integer bytes in big endian, so it was still correctly described, but now the message payload that was already in big endian was properly described by the header as well. The conversion routine was now doing its worked based on good information and the converted message was good. IMS was able to process it and send back a reply.

The lesson here is the vast majority of the time the data produced by the MQ Client is in the CCSID and Encoding for the platform that the MQ Client is executing on, and letting the MQMD.CCSID and MQMD.Encoding default is just fine. But if your app has the capability to produce data in a different encoding or CCSID you need to identify that you are doing that and then set the MQMD fields so that the data is described correctly.

It looks like the WTX Map could set those integer bytes to the native byte order which would give you little endian. If that was done the default MQMD.Encoding of 546 would correctly describe the data and that would work.

A. The map sets the bytes to little endian and the MQMD.Encoding is allowed to default to 546, or can be explicitly set to 546 for clarity’s sake

B. The map set the bytes to big endian and the MQMD.Encoding must be set to 273. This is how things are now.

I am not aware of there being a strong reason to go with A or B. If writing this thing from the ground up I would probably vote for A. If you are writing the request on a little endian platform, and the receiver can do a standard convert, then produce the data in the encoding that matches where the producer is executing. But B will work fine too.


Peter Potkay


From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Thursday, June 20, 2013 8:35 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge


” I think you can agree that the CONVERT=YES is the way to go”

Nope ☺

I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.

In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.


I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.


But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Wednesday, June 19, 2013 4:06 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –


· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:

<!-- Create MQIIH header to prefix the message data -->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>

This is what occurs, based on that setting:

[cid:***@01CE6E6F.4AA84510]


· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.

Put these together and it is obvious that supplying the correct Encoding value should do the trick.

Art

________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.
Code:

I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.
Code:

I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.
Code:

A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:
Code:

I I H Ú C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:
Code:

‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.



Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.

Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter –

We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic
or at least run a quick test w/ a new channel has CONVERT=YES set.

Cheers,
Art
________________________________
[National IT Services]Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>



[National IT Green Logo]

[CertWS_color]

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Hi Art,
The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.

Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.
· You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?

I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.

Some things I have found:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”

“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message
.”


I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm

“•Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.
Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue.”

Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.

I don’t know what “If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.


Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?


Peter Potkay

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: DataPower, Encoding and the OTMA Bridge

Resending to correct horrible formatting of previous response and to add comment about channel conversion


Peter -

Here are a few things to verify:

· Use the MQIMSVS format for msgs destined for the OTMA bridge. (http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.
· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA
· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS
· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.

These are some of the 'gotchas' that I have come across and should get you going in the right direction.

Good Luck!
Art



[Image removed by sender.]


[Image removed by sender.]
Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org<mailto:***@frit.frb.org>

[cid:***@01CE6E6F.4AA84510]

[cid:***@01CE6E6F.4AA84510]




________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
Dominique Courtois
2013-06-21 21:02:29 UTC
Permalink
Peter,
That's clear and you are globally right.
But there are two details in point 9 which I believe not true.
1-The channel which converst is not always the RCVR. I think that the MCA responsible for conversion of headers is negociated at channel connection establishment. Can be the SDR.
2-The MCAs are not supposed to convert the payload (aka the message data), only the headers.

Regards

Dominique

----- Mail original -----
De: "Peter M Potkay (CTO Architecture + Engineering)" <***@THEHARTFORD.COM>
À: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Envoyé: Vendredi 21 Juin 2013 17:06:39
Objet: Re: DataPower, Encoding and the OTMA Bridge




Here is the end result for this problem and solution.



Problem Summary :

Messages sent from Datapower via MQ to an OTMA Bridge queue on the mainframe were causing the IMS transaction to abend.



Solution:

By populating the MQMD.Encoding field in the MQ message to 273 the abends stopped and a good reply came back from IMS. We figured this out last Friday, the question was why did this work. Was it a proper solution, or a hack to get around a bug and the hack solution might itself break in the future? We now know this is the right solution.



1. WTX Developer A was using a WTX Map to create the application specific message payload in the MQ message. He was referring to how another app first did it in their Java code years ago to understand how to lay the data out.

2. Datapower Developer B was creating the MQMD header and the MQIIH header, appending WTX Developer A’s app data and sending it to the MQ queue.

3. Developer B was not specifying the MQMD Encoding or the MQMD CCSID fields when creating the message. I consider this is normal. In general you want to allow these fields to default because by default the MQ Client libraries will correctly identify the platform they are executing on and will fill in the Encoding and CCSID appropriate for the client platform. In this case the client platform is Datapower and the default encoding value is 546 (little endian based on most likely x86 chips) and the default encoding is 819 (a Unix variant), so that’s what the default values ended up being.

4. The encoding value is meant to describe the non character data like integer bytes, and the CCSID describes the character data.

5. We now had an MQ message where the MQMD header had MQMD.Encoding 546 and MQMD.CCSID 819.

6. The MQIIH header that follows the MQMD was built to match whatever the MQMD said. So the MQIIH’s character data was in the 819 code page. The MQIIH also happens to have some integer byte fields, so the encoding value in the header is relevant. The bytes were created to match the MQMD.Encoding value of 546, so they were in little endian format. So far so code.

7. While the MQIIH has its own encoding and CCSID fields, they are not used for anything. This is documented in the MQ manuals. This is contrary to other types of headers like an RFH2 header, where the MQMD describes the format of the RFH2, and then the RFH2 fields describe what follows it, usually the app data. So the MQIIH and the app data that follows it both need to be in the same encoding and CCSID.

8. In the application data created by the WTX Map, there was character data. The WTX Map asked for “Native” data character set, so the character data was produced in a character set appropriate for the executing platform (DataPower) and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.

9. In the application data created by the WTX Map, there were also some binary integer fields in the data. This is not common at all but these types of fields are required when sending to IMS via the OTMA bridge. The WTX Map asked for the Byte Order of these fields to be “Big Endian” (based on the UCFE model in step 1) and so the data was produced in a big endian format. We now a message payload where some of the fields are in big endian, but the MQMD.Encoding value is little endian (546). This is what causes the abends on the mainframe. Some of the data in the payload is not described correctly by the header in this scenario and the next app that tries to MQ convert this data (the RCVR MCA on the mainframe QM in this case) ends up with some of the fields completely garbled.

10. When Developer B hard coded the MQMD.Encoding field to 273 (big endian) two things occurred. The MQIIH header was created with its integer bytes in big endian, so it was still correctly described, but now the message payload that was already in big endian was properly described by the header as well. The conversion routine was now doing its worked based on good information and the converted message was good. IMS was able to process it and send back a reply.



The lesson here is the vast majority of the time the data produced by the MQ Client is in the CCSID and Encoding for the platform that the MQ Client is executing on, and letting the MQMD.CCSID and MQMD.Encoding default is just fine. But if your app has the capability to produce data in a different encoding or CCSID you need to identify that you are doing that and then set the MQMD fields so that the data is described correctly.



It looks like the WTX Map could set those integer bytes to the native byte order which would give you little endian. If that was done the default MQMD.Encoding of 546 would correctly describe the data and that would work.

A. The map sets the bytes to little endian and the MQMD.Encoding is allowed to default to 546, or can be explicitly set to 546 for clarity’s sake

B. The map set the bytes to big endian and the MQMD.Encoding must be set to 273. This is how things are now.



I am not aware of there being a strong reason to go with A or B. If writing this thing from the ground up I would probably vote for A. If you are writing the request on a little endian platform, and the receiver can do a standard convert, then produce the data in the encoding that matches where the producer is executing. But B will work fine too.






Peter Potkay







From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Thursday, June 20, 2013 8:35 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



…” I think you can agree that the CONVERT=YES is the way to go”



Nope J



I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.



In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.





I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.





But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.






Peter Potkay





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Schanz, Arthur
Sent: Wednesday, June 19, 2013 4:06 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



Peter –



· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:



< ! -- Cr e ate MQ I IH h ea d er t o p ref i x t he mes s age da t a - ->

< x sl : va r iab l e n ame = "M Q IIH N od e set " >

< MQ I IH>

<En c od i ng> 0 </ E nco d in g >

<Co d ed C har S et I d>1 2 08 < /Co d ed C ha r Set I d>

<Fo r ma t >MQ S TR < /Fo r ma t >



This is what occurs, based on that setting:







· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.



Put these together and it is obvious that supplying the correct Encoding value should do the trick.



Art







National IT ServicesArthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org




National IT Green Logo

CertWS_color





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.



Code:


I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.



Code:


I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.



Code:


A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:



Code:


I I H è C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:



Code:


I I H è C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.








Peter Potkay





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.




Peter Potkay





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



Peter –



We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).

Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.

If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic…or at least run a quick test w/ a new channel has CONVERT=YES set.



Cheers,

Art





National IT ServicesArthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org




National IT Green Logo

CertWS_color





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge



Hi Art,

The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.



Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.

· You mention “ We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS ”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?



I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.



Some things I have found:



http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm

“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”



“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message….”





I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.





http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm



“• Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.

Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue .”



Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.



I don’t know what “ If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing ” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.





Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?






Peter Potkay





From: MQSeries List [ mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org ] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: DataPower, Encoding and the OTMA Bridge




Resending to correct horrible formatting of previous response and to add comment about channel conversion…





Peter -





Here are a few things to verify:




· Use the MQIMSVS format for msgs destined for the OTMA bridge. ( http://www-01.ibm.com/support/docview.wss?uid=swg21607923 )

· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.

· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA

· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS

· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.





These are some of the 'gotchas' that I have come across and should get you going in the right direction.





Good Luck!


Art










Image removed by sender.





Image removed by sender.


Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: Arthur.Schanz-***@public.gmane.org





















List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Darren Douch
2013-06-21 22:53:16 UTC
Permalink
A very good piece of detective work in the end Peter, but I would take a
different view of the lesson to be learned, especially when the developers sit
down in class next time. ;)

The lesson is to first understand your data and only rely on the default
ccsid/encoding values once you've made a conscious decision that they accurately
describe it.

Darren
Post by Potkay, Peter M (CTO Architecture + Engineering)
Here is the end result for this problem and solution.
Messages sent from Datapower via MQ to an OTMA Bridge queue on the mainframe
were causing the IMS transaction to abend.
*Solution: *
By populating the MQMD.Encoding field in the MQ message to 273 the abends
stopped and a good reply came back from IMS. We figured this out last Friday,
the question was why did this work. Was it a proper solution, or a hack to get
around a bug and the hack solution might itself break in the future? We now
know this is the right solution.
1.WTX Developer A was using a WTX Map to create the application specific
message payload in the MQ message. He was referring to how another app first
did it in their Java code years ago to understand how to lay the data out.
2.Datapower Developer B was creating the MQMD header and the MQIIH header,
appending WTX Developer A’s app data and sending it to the MQ queue.
3.Developer B was not specifying the MQMD Encoding or the MQMD CCSID fields
when creating the message. I consider this is normal. In general you want to
allow these fields to default because by default the MQ Client libraries will
correctly identify the platform they are executing on and will fill in the
Encoding and CCSID appropriate for the client platform. In this case the
client platform is Datapower and the default encoding value is 546 (little
endian based on most likely x86 chips) and the default encoding is 819 (a Unix
variant), so that’s what the default values ended up being.
4.The encoding value is meant to describe the non character data like integer
bytes, and the CCSID describes the character data.
5.We now had an MQ message where the MQMD header had MQMD.Encoding 546 and
MQMD.CCSID 819.
6.The MQIIH header that follows the MQMD was built to match whatever the MQMD
said. So the MQIIH’s character data was in the 819 code page. The MQIIH also
happens to have some integer byte fields, so the encoding value in the header
is relevant. The bytes were created to match the MQMD.Encoding value of 546,
so they were in little endian format. So far so code.
7.While the MQIIH has its own encoding and CCSID fields, they are not used for
anything. This is documented in the MQ manuals. This is contrary to other
types of headers like an RFH2 header, where the MQMD describes the format of
the RFH2, and then the RFH2 fields describe what follows it, usually the app
data. So the MQIIH and the app data that follows it both need to be in the
same encoding and CCSID.
8.In the application data created by the WTX Map, there was character data.
The WTX Map asked for “Native” data character set, so the character data was
produced in a character set appropriate for the executing platform (DataPower)
and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.
9.In the application data created by the WTX Map, there were also some binary
integer fields in the data. This is not common at all but these types of
fields are required when sending to IMS via the OTMA bridge. The WTX Map asked
for the Byte Order of these fields to be “Big Endian” (based on the UCFE model
in step 1) and so the data was produced in a big endian format. We now a
message payload where some of the fields are in big endian, but the
MQMD.Encoding value is little endian (546). This is what causes the abends on
the mainframe. Some of the data in the payload is not described correctly by
the header in this scenario and the next app that tries to MQ convert this
data (the RCVR MCA on the mainframe QM in this case) ends up with some of the
fields completely garbled.
10.When Developer B hard coded the MQMD.Encoding field to 273 (big endian) two
things occurred. The MQIIH header was created with its integer bytes in big
endian, so it was still correctly described, but now the message payload that
was already in big endian was properly described by the header as well. The
conversion routine was now doing its worked based on good information and the
converted message was good. IMS was able to process it and send back a reply.
The lesson here is the vast majority of the time the data produced by the MQ
Client is in the CCSID and Encoding for the platform that the MQ Client is
executing on, and letting the MQMD.CCSID and MQMD.Encoding default is just
fine. But if your app has the capability to produce data in a different
encoding or CCSID you need to identify that you are doing that and then set
the MQMD fields so that the data is described correctly.
It looks like the WTX Map could set those integer bytes to the native byte
order which would give you little endian. If that was done the default
MQMD.Encoding of 546 would correctly describe the data and that would work.
A.The map sets the bytes to little endian and the MQMD.Encoding is allowed to
default to 546, or can be explicitly set to 546 for clarity’s sake
B.The map set the bytes to big endian and the MQMD.Encoding must be set to
273. This is how things are now.
I am not aware of there being a strong reason to go with A or B. If writing
this thing from the ground up I would probably vote for A. If you are writing
the request on a little endian platform, and the receiver can do a standard
convert, then produce the data in the encoding that matches where the producer
is executing. But B will work fine too.
*Peter Potkay*
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Thursday, June 20, 2013 8:35 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
…” I think you can agree that the CONVERT=YES is the way to go”
Nope J
I’ve had it beaten into my head every since my first week of MQ training that
receiver makes good, that channel conversion is an option left over from the
early days of MQ when certain MQ versions on certain platforms could not
convert some relatively common CCSIDs. If one had to rely on a channel to
convert, it was a band aid solution trying to make up for a deficiency at one
end or the other of the transaction.
In my case the sender and receiver are all current IBM software and hardware.
IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue
manager which talks to an IBM IMS transaction via another IBM MQ queue manager
that runs on an IBM mainframe. All software current and all infrastructure
inside the USA, so no weird language considerations. If I needed to rely on a
SNDR channel to convert in this case I think it would be to work around a bug.
I don’t think there is an issue with conversion at this point. I think it’s a
matter of understanding how and why the CCSID and Encoding is being set for
the MQMD, the MQIIH and the actual data, and then tagging it appropriately.
Once the data is described accurately, conversion will work as expected
whether its by the receiver (the RCVR MCA on the mainframe in this case
because it’s a message destined for an OTMA queue – that was a revelation
during this research!) or a SNDR channel.
But I will give you this – your suggestion to use the SNDR channel for
conversion was crucial in my tests to come to the conclusions I have so far.
Seeing what the data looked like before and after conversion for Message A and
B, without having a receiving app involved, was key.
*Peter Potkay*
*Schanz, Arthur
*Sent:* Wednesday, June 19, 2013 4:06 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
·I think you can agree that the CONVERT=YES is the way to go. It produces the
required EBCDIC data that the MF & IMS require.
·As far as the encoding, you can see that the value as shown in all of the IIH
samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is
in the full word following the length field (x’00000054’). I believe this is
<!-- CreateMQIIH headerto prefix the message data-->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>
·For the payload, “Message B” works because the *LLZZ* is showing valid values
(the full word before the beginning of the IMS trancode). This proves that
this is using the necessary Encoding value.
Put these together and it is obvious that supplying the correct Encoding value
should do the trick.
Art
--------------------------------------------------------------------------------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Wednesday, June 19, 2013 12:18 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
*Message A*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
without specifying the MQMD Encoding on the MQPUT. The message ends up with an
Encoding of 546, the CCSID is 819. The app data payload is built with a WTX
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM
looking at the data with the Text and Hex columns turned on.
*Code:*
I I H T 49494820 01000000 54000000 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
*Message B*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an
Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex.
Notice the difference in endianess of the 2nd and 3rd block of data when
compared to Message A.
*Code:*
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows. Notice
the bytes are exactly the same when compared to Message A, but the MQMD has a
different Encoding describing these exact bytes. Uh oh, you can see there is
going to be a conversion issue.
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header,
in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes
are produced in the MQIIH Header, but it is not having an effect on the bytes
in the message payload?
Repeating the test but instead having both Message A and B go from the Linux
QM to the mainframe QM over a SNDR channel with convert set to NO has the
messages looking exactly the same as when they were at rest in a local queue
on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and
repeat the test.
*Message A* now has an Encoding of 785 and a CCSID of 500. The first line of
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
*Message B* now also has an Encoding of 785 and a CCSID of 500. The first line
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B in the
data payload, but the MQIIH looks the same. So the MQIIH header is getting
described properly by the MQMD Encoding and thus being converted properly. The
message payload beyond the MQIIH is potentially not being described properly
in one of these cases.
OK, lets see how the IMS application deals with this. Datapower connects in
client mode to that Linux Queue Manager putting to a remote q that aims at the
mainframe over a SNDR channel with Convert set to NO.
Message A causes an Abend and 3 MQ replies come back from the OTMA bridge.
Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE
SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.
I set the SND channel to convert, restart the channel and repeat the test. No
change – Message A causes an Abend with 3 replies and Message B works correctly.
So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload
of the app data look exactly the same coming out of Datapower regardless of
the Encoding, but after translation they look different when compared to each
other, that says to me one of the Encodings is not describing the data
correctly on output. Based on testing it would seem that the 546 Encoding does
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and
Windows, and 273 for Unix. My testing seems to indicate that 273 is correct
for DataPower and 546 is incorrect. If true, is this a problem in the
DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into
this firmware version of DataPower? Maybe its picking up a Linux Encoding
value, maybe from the Linux QM its connected to? Picking up the queue
manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding
when asking for the default. They should get the encoding of THEIR platform
(not the QM’s) because THEY are producing the bytes in the message. Or maybe
the WTX map is getting in the way and producing the data in a 273 encoding
when it should be a 546 encoding?
As a test we connected Datapower directly to a z/OS Queue manager that has an
Encoding of 785. DataPower produced a message without setting the MQMD
Encoding and the message landed in the queue with an MQMD encoding of 546
again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager.
Putting the message while connected to the z/OS QM and specifying the 273
encoding also produced the same message and MQIIH as Message B above.
I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is
populating the MQMD.Encoding with 546 if allowed to default. The encoding of
the MQIIH header is produced to match this 546 encoding, but the message
payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD
default to match the encoding of the data being produced by the platform? If
yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to
IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the
MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack
work around that will byte us in the future.
**
**
*Peter Potkay*
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 11:13 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
That is a good idea Art. I’ll set up a separate path in the test environment
and have the SNDR channel on the Linux QM do the convert. We’ll have the DP
appliance comment out the part where they set the MQMD’s Encoding to 273 and
let it default to 546. And then we’ll see what the message looks like when it
arrives on a plain local queue on the mainframe side. If it arrives with a 273
encoding and the endian bits flipped around correctly this will point to their
being a problem on the mainframe side with conversion of a message with 546
encoding.
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 10:32 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic
from other non-OTMA traffic was the best for all involved. This allowed us to
use the channel/MCA to do the conversion, as the msgs will go immediately from
the receiving MCA, to the queue defined with the XCF Storage Class, and across
the OTMA bridge into IMS – hence the comment about no ‘application’ having the
ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not
requiring those applications to do anything ‘special’ to generate the msgs –
just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your
non-OTMA traffic…or at least run a quick test w/ a new channel has CONVERT=YES
set.
Cheers,
Art
--------------------------------------------------------------------------------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 10:09 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Hi Art,
The request message in this case does have an MQIIH.Format of
MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546
causes issues, while a value of 273 works OK. In either case the CCSID of 819
seems to be dealt with correctly for the character portion of the message.
With a 546 encoding the program pulling the messages of the IMS queue abends
complaining about missing or incomplete segments. I think because the LL
portion of the LLZZ, that describes the length, is not interpreted correctly
with an MQMD.Encoding of 546.
Setting the QM to QM channel to convert is not something I want to entertain.
There are tons of applications sharing this path between mid tier and z/OS and
many of them do not use the OTMA Bridge, and some successfully do.
·You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic
from distributed to z/OS”. Can you expand on that – are you putting the onus
on the mid tier app to produce an EBCIDIC request message?
I’m searching trying to get a clear answer on how messages from a distributed
queue manager arriving on a z/OS queue manager’s OTMA queue get converted.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
/“The data conversion is performed by either the distributed queuing facility
( which may call any necessary exits ) or by the intra group queuing agent (
which does not support the use of exits ) when it puts a message to a
destination queue that has XCF information defined for its storage class.”/
//
/“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a
message….”/
I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to
know that it must do some conversion if an incoming message bound for an MQ
queue defined as an OTMA Bridge queue. And apparently it is not doing it
correctly or at all for an encoding of 546 but since the 273 encoding is
mainframe friendly (assumption on my part) it works. Further assumption is
that it has no issues converting the character data from CCSID 819 of the
request message to the CCSID 500 of our mainframe QM.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm
“•/Applications that connect to other queue managers can provide an MQIIH
structure that is in any of the supported character sets and encodings;
conversion of the MQIIH is performed by the receiving message channel agent
connected to the queue manager that owns the IMS bridge queue. /
/Note: There is one exception to this. If the queue manager that owns the IMS
bridge queue is using CICS® for distributed queuing, the MQIIH must be in the
character set and encoding of the queue manager that owns the IMS bridge queue/.”
Further evidence that the RCVR MCA should be doing this. Guess the question on
the table is if 546 is a “supported encoding”.
I don’t know what “/If the queue manager that owns the IMS bridge queue is
using CICS® for distributed queuing/” means. We do have CICS attached to this
mainframe queue manager and unrelated incoming MQ messages do trigger some
CICS transactions. But I’m going to guess this is not an issue because the
character portion of the messages that we send to the bridge queue is in an
819 CCSID and it is being dealt with.
Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager
is not dealing with a 546 encoding correctly?
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 8:57 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Resending to correct horrible formatting of previous response and to add
comment about channel conversion…
Peter -
·Use the MQIMSVS format for msgs destined for the OTMA bridge.
(http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
·Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it
is part of the payload or user data portion of the message.
·Messages need to be in the expected format for IMS to successfully process
them: LLZZ TRANCODE DATA
·We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from
distributed to z/OS
·Enable character set conversion in the channel via the CONVERT=YES parameter
in your channel definition. Since there is no application prior to the OTMA
bridge doing an 'MQGET', let the channel do the work.
These are some of the 'gotchas' that I have come across and should get you
going in the right direction.
Good Luck!
Art
Image removed by sender.
Image removed by sender.
*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Tim Zielke
2013-06-22 02:20:33 UTC
Permalink
Some of you are probably already aware, but if you wanted to determine programmatically the endianness of your server, you could do something like the following C program.

#include <stdio.h>

int main()
{
int x =1;

if (*(char *)&x == 1)
printf("little endian. crack egg on small end.\n");
else
printf("big endian. crack egg on big end.\n");

return 0;
}

Peter - It might be a good confirmation to run that program on your DataPower server with the MQ Client. It should come back little endian based on your analysis. If it comes back big endian, something else is going on.

Thanks,
Tim

-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Darren Douch
Sent: Friday, June 21, 2013 5:53 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

A very good piece of detective work in the end Peter, but I would take a
different view of the lesson to be learned, especially when the developers sit
down in class next time. ;)

The lesson is to first understand your data and only rely on the default
ccsid/encoding values once you've made a conscious decision that they accurately
describe it.

Darren
Post by Potkay, Peter M (CTO Architecture + Engineering)
Here is the end result for this problem and solution.
Messages sent from Datapower via MQ to an OTMA Bridge queue on the mainframe
were causing the IMS transaction to abend.
*Solution: *
By populating the MQMD.Encoding field in the MQ message to 273 the abends
stopped and a good reply came back from IMS. We figured this out last Friday,
the question was why did this work. Was it a proper solution, or a hack to get
around a bug and the hack solution might itself break in the future? We now
know this is the right solution.
1.WTX Developer A was using a WTX Map to create the application specific
message payload in the MQ message. He was referring to how another app first
did it in their Java code years ago to understand how to lay the data out.
2.Datapower Developer B was creating the MQMD header and the MQIIH header,
appending WTX Developer A’s app data and sending it to the MQ queue.
3.Developer B was not specifying the MQMD Encoding or the MQMD CCSID fields
when creating the message. I consider this is normal. In general you want to
allow these fields to default because by default the MQ Client libraries will
correctly identify the platform they are executing on and will fill in the
Encoding and CCSID appropriate for the client platform. In this case the
client platform is Datapower and the default encoding value is 546 (little
endian based on most likely x86 chips) and the default encoding is 819 (a Unix
variant), so that’s what the default values ended up being.
4.The encoding value is meant to describe the non character data like integer
bytes, and the CCSID describes the character data.
5.We now had an MQ message where the MQMD header had MQMD.Encoding 546 and
MQMD.CCSID 819.
6.The MQIIH header that follows the MQMD was built to match whatever the MQMD
said. So the MQIIH’s character data was in the 819 code page. The MQIIH also
happens to have some integer byte fields, so the encoding value in the header
is relevant. The bytes were created to match the MQMD.Encoding value of 546,
so they were in little endian format. So far so code.
7.While the MQIIH has its own encoding and CCSID fields, they are not used for
anything. This is documented in the MQ manuals. This is contrary to other
types of headers like an RFH2 header, where the MQMD describes the format of
the RFH2, and then the RFH2 fields describe what follows it, usually the app
data. So the MQIIH and the app data that follows it both need to be in the
same encoding and CCSID.
8.In the application data created by the WTX Map, there was character data.
The WTX Map asked for “Native” data character set, so the character data was
produced in a character set appropriate for the executing platform (DataPower)
and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.
9.In the application data created by the WTX Map, there were also some binary
integer fields in the data. This is not common at all but these types of
fields are required when sending to IMS via the OTMA bridge. The WTX Map asked
for the Byte Order of these fields to be “Big Endian” (based on the UCFE model
in step 1) and so the data was produced in a big endian format. We now a
message payload where some of the fields are in big endian, but the
MQMD.Encoding value is little endian (546). This is what causes the abends on
the mainframe. Some of the data in the payload is not described correctly by
the header in this scenario and the next app that tries to MQ convert this
data (the RCVR MCA on the mainframe QM in this case) ends up with some of the
fields completely garbled.
10.When Developer B hard coded the MQMD.Encoding field to 273 (big endian) two
things occurred. The MQIIH header was created with its integer bytes in big
endian, so it was still correctly described, but now the message payload that
was already in big endian was properly described by the header as well. The
conversion routine was now doing its worked based on good information and the
converted message was good. IMS was able to process it and send back a reply.
The lesson here is the vast majority of the time the data produced by the MQ
Client is in the CCSID and Encoding for the platform that the MQ Client is
executing on, and letting the MQMD.CCSID and MQMD.Encoding default is just
fine. But if your app has the capability to produce data in a different
encoding or CCSID you need to identify that you are doing that and then set
the MQMD fields so that the data is described correctly.
It looks like the WTX Map could set those integer bytes to the native byte
order which would give you little endian. If that was done the default
MQMD.Encoding of 546 would correctly describe the data and that would work.
A.The map sets the bytes to little endian and the MQMD.Encoding is allowed to
default to 546, or can be explicitly set to 546 for clarity’s sake
B.The map set the bytes to big endian and the MQMD.Encoding must be set to
273. This is how things are now.
I am not aware of there being a strong reason to go with A or B. If writing
this thing from the ground up I would probably vote for A. If you are writing
the request on a little endian platform, and the receiver can do a standard
convert, then produce the data in the encoding that matches where the producer
is executing. But B will work fine too.
*Peter Potkay*
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Thursday, June 20, 2013 8:35 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
…” I think you can agree that the CONVERT=YES is the way to go”
Nope J
I’ve had it beaten into my head every since my first week of MQ training that
receiver makes good, that channel conversion is an option left over from the
early days of MQ when certain MQ versions on certain platforms could not
convert some relatively common CCSIDs. If one had to rely on a channel to
convert, it was a band aid solution trying to make up for a deficiency at one
end or the other of the transaction.
In my case the sender and receiver are all current IBM software and hardware.
IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue
manager which talks to an IBM IMS transaction via another IBM MQ queue manager
that runs on an IBM mainframe. All software current and all infrastructure
inside the USA, so no weird language considerations. If I needed to rely on a
SNDR channel to convert in this case I think it would be to work around a bug.
I don’t think there is an issue with conversion at this point. I think it’s a
matter of understanding how and why the CCSID and Encoding is being set for
the MQMD, the MQIIH and the actual data, and then tagging it appropriately.
Once the data is described accurately, conversion will work as expected
whether its by the receiver (the RCVR MCA on the mainframe in this case
because it’s a message destined for an OTMA queue – that was a revelation
during this research!) or a SNDR channel.
But I will give you this – your suggestion to use the SNDR channel for
conversion was crucial in my tests to come to the conclusions I have so far.
Seeing what the data looked like before and after conversion for Message A and
B, without having a receiving app involved, was key.
*Peter Potkay*
*Schanz, Arthur
*Sent:* Wednesday, June 19, 2013 4:06 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
·I think you can agree that the CONVERT=YES is the way to go. It produces the
required EBCDIC data that the MF & IMS require.
·As far as the encoding, you can see that the value as shown in all of the IIH
samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is
in the full word following the length field (x’00000054’). I believe this is
<!-- CreateMQIIH headerto prefix the message data-->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>
·For the payload, “Message B” works because the *LLZZ* is showing valid values
(the full word before the beginning of the IMS trancode). This proves that
this is using the necessary Encoding value.
Put these together and it is obvious that supplying the correct Encoding value
should do the trick.
Art
--------------------------------------------------------------------------------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Wednesday, June 19, 2013 12:18 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
*Message A*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
without specifying the MQMD Encoding on the MQPUT. The message ends up with an
Encoding of 546, the CCSID is 819. The app data payload is built with a WTX
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM
looking at the data with the Text and Hex columns turned on.
*Code:*
I I H T 49494820 01000000 54000000 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
*Message B*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6)
specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an
Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex.
Notice the difference in endianess of the 2nd and 3rd block of data when
compared to Message A.
*Code:*
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows. Notice
the bytes are exactly the same when compared to Message A, but the MQMD has a
different Encoding describing these exact bytes. Uh oh, you can see there is
going to be a conversion issue.
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header,
in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes
are produced in the MQIIH Header, but it is not having an effect on the bytes
in the message payload?
Repeating the test but instead having both Message A and B go from the Linux
QM to the mainframe QM over a SNDR channel with convert set to NO has the
messages looking exactly the same as when they were at rest in a local queue
on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and
repeat the test.
*Message A* now has an Encoding of 785 and a CCSID of 500. The first line of
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
*Message B* now also has an Encoding of 785 and a CCSID of 500. The first line
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B in the
data payload, but the MQIIH looks the same. So the MQIIH header is getting
described properly by the MQMD Encoding and thus being converted properly. The
message payload beyond the MQIIH is potentially not being described properly
in one of these cases.
OK, lets see how the IMS application deals with this. Datapower connects in
client mode to that Linux Queue Manager putting to a remote q that aims at the
mainframe over a SNDR channel with Convert set to NO.
Message A causes an Abend and 3 MQ replies come back from the OTMA bridge.
Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE
SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.
I set the SND channel to convert, restart the channel and repeat the test. No
change – Message A causes an Abend with 3 replies and Message B works correctly.
So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload
of the app data look exactly the same coming out of Datapower regardless of
the Encoding, but after translation they look different when compared to each
other, that says to me one of the Encodings is not describing the data
correctly on output. Based on testing it would seem that the 546 Encoding does
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and
Windows, and 273 for Unix. My testing seems to indicate that 273 is correct
for DataPower and 546 is incorrect. If true, is this a problem in the
DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into
this firmware version of DataPower? Maybe its picking up a Linux Encoding
value, maybe from the Linux QM its connected to? Picking up the queue
manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding
when asking for the default. They should get the encoding of THEIR platform
(not the QM’s) because THEY are producing the bytes in the message. Or maybe
the WTX map is getting in the way and producing the data in a 273 encoding
when it should be a 546 encoding?
As a test we connected Datapower directly to a z/OS Queue manager that has an
Encoding of 785. DataPower produced a message without setting the MQMD
Encoding and the message landed in the queue with an MQMD encoding of 546
again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager.
Putting the message while connected to the z/OS QM and specifying the 273
encoding also produced the same message and MQIIH as Message B above.
I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is
populating the MQMD.Encoding with 546 if allowed to default. The encoding of
the MQIIH header is produced to match this 546 encoding, but the message
payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD
default to match the encoding of the data being produced by the platform? If
yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to
IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the
MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack
work around that will byte us in the future.
**
**
*Peter Potkay*
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 11:13 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
That is a good idea Art. I’ll set up a separate path in the test environment
and have the SNDR channel on the Linux QM do the convert. We’ll have the DP
appliance comment out the part where they set the MQMD’s Encoding to 273 and
let it default to 546. And then we’ll see what the message looks like when it
arrives on a plain local queue on the mainframe side. If it arrives with a 273
encoding and the endian bits flipped around correctly this will point to their
being a problem on the mainframe side with conversion of a message with 546
encoding.
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 10:32 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic
from other non-OTMA traffic was the best for all involved. This allowed us to
use the channel/MCA to do the conversion, as the msgs will go immediately from
the receiving MCA, to the queue defined with the XCF Storage Class, and across
the OTMA bridge into IMS – hence the comment about no ‘application’ having the
ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not
requiring those applications to do anything ‘special’ to generate the msgs –
just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from your
non-OTMA traffic…or at least run a quick test w/ a new channel has CONVERT=YES
set.
Cheers,
Art
--------------------------------------------------------------------------------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
*Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 10:09 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Hi Art,
The request message in this case does have an MQIIH.Format of
MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546
causes issues, while a value of 273 works OK. In either case the CCSID of 819
seems to be dealt with correctly for the character portion of the message.
With a 546 encoding the program pulling the messages of the IMS queue abends
complaining about missing or incomplete segments. I think because the LL
portion of the LLZZ, that describes the length, is not interpreted correctly
with an MQMD.Encoding of 546.
Setting the QM to QM channel to convert is not something I want to entertain.
There are tons of applications sharing this path between mid tier and z/OS and
many of them do not use the OTMA Bridge, and some successfully do.
·You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic
from distributed to z/OS”. Can you expand on that – are you putting the onus
on the mid tier app to produce an EBCIDIC request message?
I’m searching trying to get a clear answer on how messages from a distributed
queue manager arriving on a z/OS queue manager’s OTMA queue get converted.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm
/“The data conversion is performed by either the distributed queuing facility
( which may call any necessary exits ) or by the intra group queuing agent (
which does not support the use of exits ) when it puts a message to a
destination queue that has XCF information defined for its storage class.”/
//
/“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a
message….”/
I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to
know that it must do some conversion if an incoming message bound for an MQ
queue defined as an OTMA Bridge queue. And apparently it is not doing it
correctly or at all for an encoding of 546 but since the 273 encoding is
mainframe friendly (assumption on my part) it works. Further assumption is
that it has no issues converting the character data from CCSID 819 of the
request message to the CCSID 500 of our mainframe QM.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm
“•/Applications that connect to other queue managers can provide an MQIIH
structure that is in any of the supported character sets and encodings;
conversion of the MQIIH is performed by the receiving message channel agent
connected to the queue manager that owns the IMS bridge queue. /
/Note: There is one exception to this. If the queue manager that owns the IMS
bridge queue is using CICS® for distributed queuing, the MQIIH must be in the
character set and encoding of the queue manager that owns the IMS bridge queue/.”
Further evidence that the RCVR MCA should be doing this. Guess the question on
the table is if 546 is a “supported encoding”.
I don’t know what “/If the queue manager that owns the IMS bridge queue is
using CICS® for distributed queuing/” means. We do have CICS attached to this
mainframe queue manager and unrelated incoming MQ messages do trigger some
CICS transactions. But I’m going to guess this is not an issue because the
character portion of the messages that we send to the bridge queue is in an
819 CCSID and it is being dealt with.
Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager
is not dealing with a 546 encoding correctly?
*Peter Potkay*
*Schanz, Arthur
*Sent:* Monday, June 17, 2013 8:57 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Resending to correct horrible formatting of previous response and to add
comment about channel conversion…
Peter -
·Use the MQIMSVS format for msgs destined for the OTMA bridge.
(http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
·Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it
is part of the payload or user data portion of the message.
·Messages need to be in the expected format for IMS to successfully process
them: LLZZ TRANCODE DATA
·We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from
distributed to z/OS
·Enable character set conversion in the channel via the CONVERT=YES parameter
in your channel definition. Since there is no application prior to the OTMA
bridge doing an 'MQGET', let the channel do the work.
These are some of the 'gotchas' that I have come across and should get you
going in the right direction.
Good Luck!
Art
Image removed by sender.
Image removed by sender.
*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If you are
not the intended recipient, please notify the sender immediately by return
e-mail, delete this communication and destroy all copies.
************************************************************
To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-25 18:12:36 UTC
Permalink
DataPower is an appliance. I won't be able to run that code.

But I do have a PMR open asking for confirmation that by default DP spits out little endian data.


Peter Potkay


-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: Friday, June 21, 2013 10:21 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Some of you are probably already aware, but if you wanted to determine programmatically the endianness of your server, you could do something like the following C program.

#include <stdio.h>

int main()
{
int x =1;

if (*(char *)&x == 1)
printf("little endian. crack egg on small end.\n");
else
printf("big endian. crack egg on big end.\n");

return 0;
}

Peter - It might be a good confirmation to run that program on your DataPower server with the MQ Client. It should come back little endian based on your analysis. If it comes back big endian, something else is going on.

Thanks,
Tim

-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Darren Douch
Sent: Friday, June 21, 2013 5:53 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

A very good piece of detective work in the end Peter, but I would take a different view of the lesson to be learned, especially when the developers sit down in class next time. ;)

The lesson is to first understand your data and only rely on the default ccsid/encoding values once you've made a conscious decision that they accurately describe it.

Darren
Post by Potkay, Peter M (CTO Architecture + Engineering)
Here is the end result for this problem and solution.
Messages sent from Datapower via MQ to an OTMA Bridge queue on the
mainframe were causing the IMS transaction to abend.
*Solution: *
By populating the MQMD.Encoding field in the MQ message to 273 the
abends stopped and a good reply came back from IMS. We figured this
out last Friday, the question was why did this work. Was it a proper
solution, or a hack to get around a bug and the hack solution might
itself break in the future? We now know this is the right solution.
1.WTX Developer A was using a WTX Map to create the application
specific message payload in the MQ message. He was referring to how
another app first did it in their Java code years ago to understand how to lay the data out.
2.Datapower Developer B was creating the MQMD header and the MQIIH
header, appending WTX Developer A’s app data and sending it to the MQ queue.
3.Developer B was not specifying the MQMD Encoding or the MQMD CCSID
fields when creating the message. I consider this is normal. In
general you want to allow these fields to default because by default
the MQ Client libraries will correctly identify the platform they are
executing on and will fill in the Encoding and CCSID appropriate for
the client platform. In this case the client platform is Datapower and
the default encoding value is 546 (little endian based on most likely
x86 chips) and the default encoding is 819 (a Unix variant), so that’s what the default values ended up being.
4.The encoding value is meant to describe the non character data like
integer bytes, and the CCSID describes the character data.
5.We now had an MQ message where the MQMD header had MQMD.Encoding 546
and MQMD.CCSID 819.
6.The MQIIH header that follows the MQMD was built to match whatever
the MQMD said. So the MQIIH’s character data was in the 819 code page.
The MQIIH also happens to have some integer byte fields, so the
encoding value in the header is relevant. The bytes were created to
match the MQMD.Encoding value of 546, so they were in little endian format. So far so code.
7.While the MQIIH has its own encoding and CCSID fields, they are not
used for anything. This is documented in the MQ manuals. This is
contrary to other types of headers like an RFH2 header, where the MQMD
describes the format of the RFH2, and then the RFH2 fields describe
what follows it, usually the app data. So the MQIIH and the app data
that follows it both need to be in the same encoding and CCSID.
8.In the application data created by the WTX Map, there was character data.
The WTX Map asked for “Native” data character set, so the character
data was produced in a character set appropriate for the executing
platform (DataPower) and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.
9.In the application data created by the WTX Map, there were also some
binary integer fields in the data. This is not common at all but these
types of fields are required when sending to IMS via the OTMA bridge.
The WTX Map asked for the Byte Order of these fields to be “Big
Endian” (based on the UCFE model in step 1) and so the data was
produced in a big endian format. We now a message payload where some
of the fields are in big endian, but the MQMD.Encoding value is little
endian (546). This is what causes the abends on the mainframe. Some of
the data in the payload is not described correctly by the header in
this scenario and the next app that tries to MQ convert this data (the
RCVR MCA on the mainframe QM in this case) ends up with some of the fields completely garbled.
10.When Developer B hard coded the MQMD.Encoding field to 273 (big
endian) two things occurred. The MQIIH header was created with its
integer bytes in big endian, so it was still correctly described, but
now the message payload that was already in big endian was properly
described by the header as well. The conversion routine was now doing
its worked based on good information and the converted message was good. IMS was able to process it and send back a reply.
The lesson here is the vast majority of the time the data produced by
the MQ Client is in the CCSID and Encoding for the platform that the
MQ Client is executing on, and letting the MQMD.CCSID and
MQMD.Encoding default is just fine. But if your app has the capability
to produce data in a different encoding or CCSID you need to identify
that you are doing that and then set the MQMD fields so that the data is described correctly.
It looks like the WTX Map could set those integer bytes to the native
byte order which would give you little endian. If that was done the
default MQMD.Encoding of 546 would correctly describe the data and that would work.
A.The map sets the bytes to little endian and the MQMD.Encoding is
allowed to default to 546, or can be explicitly set to 546 for
clarity’s sake
B.The map set the bytes to big endian and the MQMD.Encoding must be
set to 273. This is how things are now.
I am not aware of there being a strong reason to go with A or B. If
writing this thing from the ground up I would probably vote for A. If
you are writing the request on a little endian platform, and the
receiver can do a standard convert, then produce the data in the
encoding that matches where the producer is executing. But B will work fine too.
*Peter Potkay*
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Thursday, June 20, 2013 8:35 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
…” I think you can agree that the CONVERT=YES is the way to go”
Nope J
I’ve had it beaten into my head every since my first week of MQ
training that receiver makes good, that channel conversion is an
option left over from the early days of MQ when certain MQ versions on
certain platforms could not convert some relatively common CCSIDs. If
one had to rely on a channel to convert, it was a band aid solution
trying to make up for a deficiency at one end or the other of the transaction.
In my case the sender and receiver are all current IBM software and hardware.
IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM
MQ queue manager which talks to an IBM IMS transaction via another IBM
MQ queue manager that runs on an IBM mainframe. All software current
and all infrastructure inside the USA, so no weird language
considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.
I don’t think there is an issue with conversion at this point. I think
it’s a matter of understanding how and why the CCSID and Encoding is
being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately.
Once the data is described accurately, conversion will work as
expected whether its by the receiver (the RCVR MCA on the mainframe in
this case because it’s a message destined for an OTMA queue – that was
a revelation during this research!) or a SNDR channel.
But I will give you this – your suggestion to use the SNDR channel for
conversion was crucial in my tests to come to the conclusions I have so far.
Seeing what the data looked like before and after conversion for
Message A and B, without having a receiving app involved, was key.
*Peter Potkay*
Behalf Of *Schanz, Arthur
*Sent:* Wednesday, June 19, 2013 4:06 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
·I think you can agree that the CONVERT=YES is the way to go. It
produces the required EBCDIC data that the MF & IMS require.
·As far as the encoding, you can see that the value as shown in all of
the IIH samples is x’00000000’ (which is the numeric value of
MQENC_NATIVE), which is in the full word following the length field
<!-- CreateMQIIH headerto prefix the message data-->
<xsl:variable name="MQIIHNodeset">
<MQIIH>
<Encoding>0</Encoding>
<CodedCharSetId>1208</CodedCharSetId>
<Format>MQSTR</Format>
·For the payload, “Message B” works because the *LLZZ* is showing
valid values (the full word before the beginning of the IMS trancode).
This proves that this is using the necessary Encoding value.
Put these together and it is obvious that supplying the correct
Encoding value should do the trick.
Art
----------------------------------------------------------------------
----------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Wednesday, June 19, 2013 12:18 PM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
*Message A*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ
7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The
message ends up with an Encoding of 546, the CCSID is 819. The app
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.
dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader
_concept
The first line of the MQIIH is as follows. This is a copy and paste
from BMTM looking at the data with the Text and Hex columns turned on.
*Code:*
I I H T 49494820 01000000 54000000 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
*Message B*
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ
7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message
ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex.
Notice the difference in endianess of the 2nd and 3rd block of data
when compared to Message A.
*Code:*
I I H T 49494820 00000001 00000054 00000000
The first line of the message payload, after the MQIIH, is as follows.
Notice the bytes are exactly the same when compared to Message A, but
the MQMD has a different Encoding describing these exact bytes. Uh oh,
you can see there is going to be a conversion issue.
*Code:*
A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding
header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the
bytes are produced in the MQIIH Header, but it is not having an effect
on the bytes in the message payload?
Repeating the test but instead having both Message A and B go from the
Linux QM to the mainframe QM over a SNDR channel with convert set to
NO has the messages looking exactly the same as when they were at rest
in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes
and repeat the test.
*Message A* now has an Encoding of 785 and a CCSID of 500. The first
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5
*Message B* now also has an Encoding of 785 and a CCSID of 500. The
*Code:*
I I H è C9C9C840 00000001 00000054 00000000
*Code:*
‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5
After conversion the bytes now differ between Message A and Message B
in the data payload, but the MQIIH looks the same. So the MQIIH header
is getting described properly by the MQMD Encoding and thus being
converted properly. The message payload beyond the MQIIH is
potentially not being described properly in one of these cases.
OK, lets see how the IMS application deals with this. Datapower
connects in client mode to that Linux Queue Manager putting to a
remote q that aims at the mainframe over a SNDR channel with Convert set to NO.
Message A causes an Abend and 3 MQ replies come back from the OTMA bridge.
Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED
AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.
I set the SND channel to convert, restart the channel and repeat the
test. No change – Message A causes an Abend with 3 replies and Message B works correctly.
So, I’m open to opinions, but here’s where I’m at. If the bytes in the
payload of the app data look exactly the same coming out of Datapower
regardless of the Encoding, but after translation they look different
when compared to each other, that says to me one of the Encodings is
not describing the data correctly on output. Based on testing it would
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for
Linux and Windows, and 273 for Unix. My testing seems to indicate that
273 is correct for DataPower and 546 is incorrect. If true, is this a
problem in the DataPower layer, or perhaps in the MQ Client version
(7.1.0.1) loaded into this firmware version of DataPower? Maybe its
picking up a Linux Encoding value, maybe from the Linux QM its
connected to? Picking up the queue manager’s encoding is contrary to
how MQ Clients should set an MQMD Encoding when asking for the
default. They should get the encoding of THEIR platform (not the QM’s)
because THEY are producing the bytes in the message. Or maybe the WTX
map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?
As a test we connected Datapower directly to a z/OS Queue manager that
has an Encoding of 785. DataPower produced a message without setting
the MQMD Encoding and the message landed in the queue with an MQMD
encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager.
Putting the message while connected to the z/OS QM and specifying the
273 encoding also produced the same message and MQIIH as Message B above.
I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance
is populating the MQMD.Encoding with 546 if allowed to default. The
encoding of the MQIIH header is produced to match this 546 encoding,
but the message payload produced needs an encoding of 273. Shouldn’t
the encoding in the MQMD default to match the encoding of the data
being produced by the platform? If yes, is this a problem worthy of a
PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or
IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273
on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.
**
**
*Peter Potkay*
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 11:13 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
That is a good idea Art. I’ll set up a separate path in the test
environment and have the SNDR channel on the Linux QM do the convert.
We’ll have the DP appliance comment out the part where they set the
MQMD’s Encoding to 273 and let it default to 546. And then we’ll see
what the message looks like when it arrives on a plain local queue on
the mainframe side. If it arrives with a 273 encoding and the endian
bits flipped around correctly this will point to their being a problem
on the mainframe side with conversion of a message with 546 encoding.
*Peter Potkay*
Behalf Of *Schanz, Arthur
*Sent:* Monday, June 17, 2013 10:32 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Peter –
We found early on in our OTMA ‘journey’ that separating the OTMA-bound
traffic from other non-OTMA traffic was the best for all involved.
This allowed us to use the channel/MCA to do the conversion, as the
msgs will go immediately from the receiving MCA, to the queue defined
with the XCF Storage Class, and across the OTMA bridge into IMS –
hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).
Our OTMA msgs come (primarily) from CCSID 819 defined systems. We
are not requiring those applications to do anything ‘special’ to
generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.
If at all possible, I suggest you segregate your OTMA traffic from
your non-OTMA traffic…or at least run a quick test w/ a new channel
has CONVERT=YES set.
Cheers,
Art
----------------------------------------------------------------------
----------
National IT Services*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
National IT Green Logo
CertWS_color
Behalf Of *Potkay, Peter M (CTO Architecture + Engineering)
*Sent:* Monday, June 17, 2013 10:09 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Hi Art,
The request message in this case does have an MQIIH.Format of
MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of
546 causes issues, while a value of 273 works OK. In either case the
CCSID of 819 seems to be dealt with correctly for the character portion of the message.
With a 546 encoding the program pulling the messages of the IMS queue
abends complaining about missing or incomplete segments. I think
because the LL portion of the LLZZ, that describes the length, is not
interpreted correctly with an MQMD.Encoding of 546.
Setting the QM to QM channel to convert is not something I want to entertain.
There are tons of applications sharing this path between mid tier and
z/OS and many of them do not use the OTMA Bridge, and some successfully do.
·You mention “We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our
traffic from distributed to z/OS”. Can you expand on that – are you
putting the onus on the mid tier app to produce an EBCIDIC request message?
I’m searching trying to get a clear answer on how messages from a
distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.c
sqzal.doc/fg15970_.htm
/“The data conversion is performed by either the distributed queuing
facility ( which may call any necessary exits ) or by the intra group
queuing agent ( which does not support the use of exits ) when it puts
a message to a destination queue that has XCF information defined for
its storage class.”/
//
/“Because the WebSphere MQ-IMS bridge does not convert messages when
it gets a message….”/
I guess this is saying the RCVR MCA on a z/OS queue manager is slick
enough to know that it must do some conversion if an incoming message
bound for an MQ queue defined as an OTMA Bridge queue. And apparently
it is not doing it correctly or at all for an encoding of 546 but
since the 273 encoding is mainframe friendly (assumption on my part)
it works. Further assumption is that it has no issues converting the
character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.a
mqwak.doc/ir11680_.htm
“•/Applications that connect to other queue managers can provide an
MQIIH structure that is in any of the supported character sets and
encodings; conversion of the MQIIH is performed by the receiving
message channel agent connected to the queue manager that owns the IMS
bridge queue. /
/Note: There is one exception to this. If the queue manager that owns
the IMS bridge queue is using CICS® for distributed queuing, the MQIIH
must be in the character set and encoding of the queue manager that owns the IMS bridge queue/.”
Further evidence that the RCVR MCA should be doing this. Guess the
question on the table is if 546 is a “supported encoding”.
I don’t know what “/If the queue manager that owns the IMS bridge
queue is using CICS® for distributed queuing/” means. We do have CICS
attached to this mainframe queue manager and unrelated incoming MQ
messages do trigger some CICS transactions. But I’m going to guess
this is not an issue because the character portion of the messages
that we send to the bridge queue is in an
819 CCSID and it is being dealt with.
Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue
Manager is not dealing with a 546 encoding correctly?
*Peter Potkay*
Behalf Of *Schanz, Arthur
*Sent:* Monday, June 17, 2013 8:57 AM
*Subject:* Re: DataPower, Encoding and the OTMA Bridge
Resending to correct horrible formatting of previous response and to
add comment about channel conversion…
Peter -
·Use the MQIMSVS format for msgs destined for the OTMA bridge.
(http://www-01.ibm.com/support/docview.wss?uid=swg21607923)
·Remember that the MQIIH structure is fixed length (84 bytes, or
x'54') and it is part of the payload or user data portion of the message.
·Messages need to be in the expected format for IMS to successfully
process
them: LLZZ TRANCODE DATA
·We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from
distributed to z/OS
·Enable character set conversion in the channel via the CONVERT=YES
parameter in your channel definition. Since there is no application
prior to the OTMA bridge doing an 'MQGET', let the channel do the work.
These are some of the 'gotchas' that I have come across and should get
you going in the right direction.
Good Luck!
Art
Image removed by sender.
Image removed by sender.
*Arthur Schanz*
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
----------------------------------------------------------------------
----------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html>
- Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
gnoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
************************************************************
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential and/or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all copies.
************************************************************
To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
**********************
Potkay, Peter M (CTO Architecture + Engineering)
2013-06-25 18:23:53 UTC
Permalink
QM to QM channel conversion is always going to be on the sending side, except for the one (?) exception where a receiving MCA on a z/OS QM identifies its putting to an OTMA bridge queue and there is an MQIIH header present.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12790_.htm


Sending MCAs do convert the message payload, not just headers.


According to the above link the receiving MCA on z/OS will only convert the MQIIH. Which seems odd, because further on that page it says "The application message data following the MQIIH structure must be in the same character set and encoding as the MQIIH structure.".

So if the MQIIH and the app data must match, but only the MQIIH will be converted if needed, when would the MQIIH ever need to be converted? The data must be provided in the target CCSID and Encoding, the MQIIH header must match that, so when would the MQIIH header need converting?



Peter Potkay


-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Dominique Courtois
Sent: Friday, June 21, 2013 5:02 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge

Peter,
That's clear and you are globally right.
But there are two details in point 9 which I believe not true.
1-The channel which converst is not always the RCVR. I think that the MCA responsible for conversion of headers is negociated at channel connection establishment. Can be the SDR.
2-The MCAs are not supposed to convert the payload (aka the message data), only the headers.

Regards

Dominique

----- Mail original -----
De: "Peter M Potkay (CTO Architecture + Engineering)" <***@THEHARTFORD.COM>
À: ***@LISTSERV.MEDUNIWIEN.AC.AT
Envoyé: Vendredi 21 Juin 2013 17:06:39
Objet: Re: DataPower, Encoding and the OTMA Bridge




Here is the end result for this problem and solution.



Problem Summary :

Messages sent from Datapower via MQ to an OTMA Bridge queue on the mainframe were causing the IMS transaction to abend.



Solution:

By populating the MQMD.Encoding field in the MQ message to 273 the abends stopped and a good reply came back from IMS. We figured this out last Friday, the question was why did this work. Was it a proper solution, or a hack to get around a bug and the hack solution might itself break in the future? We now know this is the right solution.



1. WTX Developer A was using a WTX Map to create the application specific message payload in the MQ message. He was referring to how another app first did it in their Java code years ago to understand how to lay the data out.

2. Datapower Developer B was creating the MQMD header and the MQIIH header, appending WTX Developer A’s app data and sending it to the MQ queue.

3. Developer B was not specifying the MQMD Encoding or the MQMD CCSID fields when creating the message. I consider this is normal. In general you want to allow these fields to default because by default the MQ Client libraries will correctly identify the platform they are executing on and will fill in the Encoding and CCSID appropriate for the client platform. In this case the client platform is Datapower and the default encoding value is 546 (little endian based on most likely x86 chips) and the default encoding is 819 (a Unix variant), so that’s what the default values ended up being.

4. The encoding value is meant to describe the non character data like integer bytes, and the CCSID describes the character data.

5. We now had an MQ message where the MQMD header had MQMD.Encoding 546 and MQMD.CCSID 819.

6. The MQIIH header that follows the MQMD was built to match whatever the MQMD said. So the MQIIH’s character data was in the 819 code page. The MQIIH also happens to have some integer byte fields, so the encoding value in the header is relevant. The bytes were created to match the MQMD.Encoding value of 546, so they were in little endian format. So far so code.

7. While the MQIIH has its own encoding and CCSID fields, they are not used for anything. This is documented in the MQ manuals. This is contrary to other types of headers like an RFH2 header, where the MQMD describes the format of the RFH2, and then the RFH2 fields describe what follows it, usually the app data. So the MQIIH and the app data that follows it both need to be in the same encoding and CCSID.

8. In the application data created by the WTX Map, there was character data. The WTX Map asked for “Native” data character set, so the character data was produced in a character set appropriate for the executing platform (DataPower) and this matched what the MQMD.CCSID field was defaulting to: 819. Still good.

9. In the application data created by the WTX Map, there were also some binary integer fields in the data. This is not common at all but these types of fields are required when sending to IMS via the OTMA bridge. The WTX Map asked for the Byte Order of these fields to be “Big Endian” (based on the UCFE model in step 1) and so the data was produced in a big endian format. We now a message payload where some of the fields are in big endian, but the MQMD.Encoding value is little endian (546). This is what causes the abends on the mainframe. Some of the data in the payload is not described correctly by the header in this scenario and the next app that tries to MQ convert this data (the RCVR MCA on the mainframe QM in this case) ends up with some of the fields completely garbled.

10. When Developer B hard coded the MQMD.Encoding field to 273 (big endian) two things occurred. The MQIIH header was created with its integer bytes in big endian, so it was still correctly described, but now the message payload that was already in big endian was properly described by the header as well. The conversion routine was now doing its worked based on good information and the converted message was good. IMS was able to process it and send back a reply.



The lesson here is the vast majority of the time the data produced by the MQ Client is in the CCSID and Encoding for the platform that the MQ Client is executing on, and letting the MQMD.CCSID and MQMD.Encoding default is just fine. But if your app has the capability to produce data in a different encoding or CCSID you need to identify that you are doing that and then set the MQMD fields so that the data is described correctly.



It looks like the WTX Map could set those integer bytes to the native byte order which would give you little endian. If that was done the default MQMD.Encoding of 546 would correctly describe the data and that would work.

A. The map sets the bytes to little endian and the MQMD.Encoding is allowed to default to 546, or can be explicitly set to 546 for clarity’s sake

B. The map set the bytes to big endian and the MQMD.Encoding must be set to 273. This is how things are now.



I am not aware of there being a strong reason to go with A or B. If writing this thing from the ground up I would probably vote for A. If you are writing the request on a little endian platform, and the receiver can do a standard convert, then produce the data in the encoding that matches where the producer is executing. But B will work fine too.






Peter Potkay







From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Thursday, June 20, 2013 8:35 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



…” I think you can agree that the CONVERT=YES is the way to go”



Nope J



I’ve had it beaten into my head every since my first week of MQ training that receiver makes good, that channel conversion is an option left over from the early days of MQ when certain MQ versions on certain platforms could not convert some relatively common CCSIDs. If one had to rely on a channel to convert, it was a band aid solution trying to make up for a deficiency at one end or the other of the transaction.



In my case the sender and receiver are all current IBM software and hardware. IBM DataPower with IBM WTX maps using IBM MQ Client to talk to an IBM MQ queue manager which talks to an IBM IMS transaction via another IBM MQ queue manager that runs on an IBM mainframe. All software current and all infrastructure inside the USA, so no weird language considerations. If I needed to rely on a SNDR channel to convert in this case I think it would be to work around a bug.





I don’t think there is an issue with conversion at this point. I think it’s a matter of understanding how and why the CCSID and Encoding is being set for the MQMD, the MQIIH and the actual data, and then tagging it appropriately. Once the data is described accurately, conversion will work as expected whether its by the receiver (the RCVR MCA on the mainframe in this case because it’s a message destined for an OTMA queue – that was a revelation during this research!) or a SNDR channel.





But I will give you this – your suggestion to use the SNDR channel for conversion was crucial in my tests to come to the conclusions I have so far. Seeing what the data looked like before and after conversion for Message A and B, without having a receiving app involved, was key.






Peter Potkay





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Schanz, Arthur
Sent: Wednesday, June 19, 2013 4:06 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



Peter –



· I think you can agree that the CONVERT=YES is the way to go. It produces the required EBCDIC data that the MF & IMS require.

· As far as the encoding, you can see that the value as shown in all of the IIH samples is x’00000000’ (which is the numeric value of MQENC_NATIVE), which is in the full word following the length field (x’00000054’). I believe this is actually being set in the stylesheet within DataPower, excerpt shown here:



< ! -- Cr e ate MQ I IH h ea d er t o p ref i x t he mes s age da t a - ->

< x sl : va r iab l e n ame = "M Q IIH N od e set " >

< MQ I IH>

<En c od i ng> 0 </ E nco d in g >

<Co d ed C har S et I d>1 2 08 < /Co d ed C ha r Set I d>

<Fo r ma t >MQ S TR < /Fo r ma t >



This is what occurs, based on that setting:







· For the payload, “Message B” works because the LLZZ is showing valid values (the full word before the beginning of the IMS trancode). This proves that this is using the necessary Encoding value.



Put these together and it is obvious that supplying the correct Encoding value should do the trick.



Art







National IT ServicesArthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org




National IT Green Logo

CertWS_color





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Wednesday, June 19, 2013 12:18 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



Message A
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) without specifying the MQMD Encoding on the MQPUT. The message ends up with an Encoding of 546, the CCSID is 819. The app data payload is built with a WTX map, the MQIIH Header is produced by the style sheet described here:
http://publib.boulder.ibm.com/infocenter/wsdatap/v4r0m2/topic/com.ibm.dp.xb.doc/integratingwithmq39.htm?path=5_3_1_3_2_1#mqint_imsinfoheader_concept
The first line of the MQIIH is as follows. This is a copy and paste from BMTM looking at the data with the Text and Hex columns turned on.



Code:


I I H T 49494820 01000000 54000000 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E



Message B
Put by DataPower (MQ Client 7.0.1.1) to a Red Hat Linux QM (MQ 7.0.1.6) specifying the MQMD Encoding as 273 on the MQPUT. The message ends up with an Encoding of 273, the CCSID is 819.
The first line of the MQIIH is as follows, first the text and then in hex. Notice the difference in endianess of the 2nd and 3rd block of data when compared to Message A.



Code:


I I H T 49494820 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows. Notice the bytes are exactly the same when compared to Message A, but the MQMD has a different Encoding describing these exact bytes. Uh oh, you can see there is going to be a conversion issue.



Code:


A 3 D H 8 7 0 1 C O N 00170000 41334448 38373031 20434F4E


http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr12840_.htm
This says the Encoding value of the MQIIH is taken from the preceding header, in this case the MQMD.
It seems the MQMD Encoding value on the MQPUT is affecting the way the bytes are produced in the MQIIH Header, but it is not having an effect on the bytes in the message payload?

Repeating the test but instead having both Message A and B go from the Linux QM to the mainframe QM over a SNDR channel with convert set to NO has the messages looking exactly the same as when they were at rest in a local queue on that Linux QM.
I change the SNDR channel on that Linux QM to have convert set to Yes and repeat the test.

Message A now has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:



Code:


I I H è C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


A 3 D H 8 7 0 1 C O N 0D400000 C1F3C4C8 F8F7F0F1 40C3D6D5




Message B now also has an Encoding of 785 and a CCSID of 500. The first line of the MQIIH is as follows:



Code:


I I H è C9C9C840 00000001 00000054 00000000


The first line of the message payload, after the MQIIH, is as follows:



Code:


‡ A 3 D H 8 7 0 1 C O N 00170000 C1F3C4C8 F8F7F0F1 40C3D6D5



After conversion the bytes now differ between Message A and Message B in the data payload, but the MQIIH looks the same. So the MQIIH header is getting described properly by the MQMD Encoding and thus being converted properly. The message payload beyond the MQIIH is potentially not being described properly in one of these cases.

OK, lets see how the IMS application deals with this. Datapower connects in client mode to that Linux Queue Manager putting to a remote q that aims at the mainframe over a SNDR channel with Convert set to NO.

Message A causes an Abend and 3 MQ replies come back from the OTMA bridge. Bunch of mainframe gibberish, put the phrase “NO SEGMENT RECEIVED AFTER TCODE SEGMENT” is in one of the 3 reply messages.
Message B causes a successful reply message to come back.

I set the SND channel to convert, restart the channel and repeat the test. No change – Message A causes an Abend with 3 replies and Message B works correctly.

So, I’m open to opinions, but here’s where I’m at. If the bytes in the payload of the app data look exactly the same coming out of Datapower regardless of the Encoding, but after translation they look different when compared to each other, that says to me one of the Encodings is not describing the data correctly on output. Based on testing it would seem that the 546 Encoding does not correctly describe the data that DataPower outputs. At this link:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaq.doc/fc_MQENC_.htm
It describes the systems for the various encodings. It shows 546 for Linux and Windows, and 273 for Unix. My testing seems to indicate that 273 is correct for DataPower and 546 is incorrect. If true, is this a problem in the DataPower layer, or perhaps in the MQ Client version (7.1.0.1) loaded into this firmware version of DataPower? Maybe its picking up a Linux Encoding value, maybe from the Linux QM its connected to? Picking up the queue manager’s encoding is contrary to how MQ Clients should set an MQMD Encoding when asking for the default. They should get the encoding of THEIR platform (not the QM’s) because THEY are producing the bytes in the message. Or maybe the WTX map is getting in the way and producing the data in a 273 encoding when it should be a 546 encoding?

As a test we connected Datapower directly to a z/OS Queue manager that has an Encoding of 785. DataPower produced a message without setting the MQMD Encoding and the message landed in the queue with an MQMD encoding of 546 again. It did not (incorrectly) pick up the 785 from the z/OS Queue Manager. Putting the message while connected to the z/OS QM and specifying the 273 encoding also produced the same message and MQIIH as Message B above.

I guess this means that the MQ Client 7.0.1.1 on a DataPower appliance is populating the MQMD.Encoding with 546 if allowed to default. The encoding of the MQIIH header is produced to match this 546 encoding, but the message payload produced needs an encoding of 273. Shouldn’t the encoding in the MQMD default to match the encoding of the data being produced by the platform? If yes, is this a problem worthy of a PMR? If yes, do you think it needs to go to IBM MQ or IBM DataPower or IBM WTX? I want to make sure that by setting the MQMD.Encoding to 273 on the put in DataPower is a legit fix and not some hack work around that will byte us in the future.








Peter Potkay





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 11:13 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



That is a good idea Art. I’ll set up a separate path in the test environment and have the SNDR channel on the Linux QM do the convert. We’ll have the DP appliance comment out the part where they set the MQMD’s Encoding to 273 and let it default to 546. And then we’ll see what the message looks like when it arrives on a plain local queue on the mainframe side. If it arrives with a 273 encoding and the endian bits flipped around correctly this will point to their being a problem on the mainframe side with conversion of a message with 546 encoding.




Peter Potkay





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 10:32 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



Peter –



We found early on in our OTMA ‘journey’ that separating the OTMA-bound traffic from other non-OTMA traffic was the best for all involved. This allowed us to use the channel/MCA to do the conversion, as the msgs will go immediately from the receiving MCA, to the queue defined with the XCF Storage Class, and across the OTMA bridge into IMS – hence the comment about no ‘application’ having the ability to do an MQGET (and therefore no chance to do an MQGET w/ Convert).

Our OTMA msgs come (primarily) from CCSID 819 defined systems. We are not requiring those applications to do anything ‘special’ to generate the msgs – just ensure that they use the native CCSID/Encoding for the originating system.

If at all possible, I suggest you segregate your OTMA traffic from your non-OTMA traffic…or at least run a quick test w/ a new channel has CONVERT=YES set.



Cheers,

Art





National IT ServicesArthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219

Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org




National IT Green Logo

CertWS_color





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Potkay, Peter M (CTO Architecture + Engineering)
Sent: Monday, June 17, 2013 10:09 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge



Hi Art,

The request message in this case does have an MQIIH.Format of MQFMT_IMS_VAR_STRING. But for some reason an incoming MQMD.Encoding of 546 causes issues, while a value of 273 works OK. In either case the CCSID of 819 seems to be dealt with correctly for the character portion of the message. With a 546 encoding the program pulling the messages of the IMS queue abends complaining about missing or incomplete segments. I think because the LL portion of the LLZZ, that describes the length, is not interpreted correctly with an MQMD.Encoding of 546.



Setting the QM to QM channel to convert is not something I want to entertain. There are tons of applications sharing this path between mid tier and z/OS and many of them do not use the OTMA Bridge, and some successfully do.

· You mention “ We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS ”. Can you expand on that – are you putting the onus on the mid tier app to produce an EBCIDIC request message?



I’m searching trying to get a clear answer on how messages from a distributed queue manager arriving on a z/OS queue manager’s OTMA queue get converted.



Some things I have found:



http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzal.doc/fg15970_.htm

“The data conversion is performed by either the distributed queuing facility ( which may call any necessary exits ) or by the intra group queuing agent ( which does not support the use of exits ) when it puts a message to a destination queue that has XCF information defined for its storage class.”



“Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message….”





I guess this is saying the RCVR MCA on a z/OS queue manager is slick enough to know that it must do some conversion if an incoming message bound for an MQ queue defined as an OTMA Bridge queue. And apparently it is not doing it correctly or at all for an encoding of 546 but since the 273 encoding is mainframe friendly (assumption on my part) it works. Further assumption is that it has no issues converting the character data from CCSID 819 of the request message to the CCSID 500 of our mainframe QM.





http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqwak.doc/ir11680_.htm



“• Applications that connect to other queue managers can provide an MQIIH structure that is in any of the supported character sets and encodings; conversion of the MQIIH is performed by the receiving message channel agent connected to the queue manager that owns the IMS bridge queue.

Note: There is one exception to this. If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing, the MQIIH must be in the character set and encoding of the queue manager that owns the IMS bridge queue .”



Further evidence that the RCVR MCA should be doing this. Guess the question on the table is if 546 is a “supported encoding”.



I don’t know what “ If the queue manager that owns the IMS bridge queue is using CICS® for distributed queuing ” means. We do have CICS attached to this mainframe queue manager and unrelated incoming MQ messages do trigger some CICS transactions. But I’m going to guess this is not an issue because the character portion of the messages that we send to the bridge queue is in an 819 CCSID and it is being dealt with.





Comments on the assumption that the RCVR MCA on our 7.0.1 z/OS Queue Manager is not dealing with a 546 encoding correctly?






Peter Potkay





From: MQSeries List [ mailto:***@LISTSERV.MEDUNIWIEN.AC.AT ] On Behalf Of Schanz, Arthur
Sent: Monday, June 17, 2013 8:57 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: DataPower, Encoding and the OTMA Bridge




Resending to correct horrible formatting of previous response and to add comment about channel conversion…





Peter -





Here are a few things to verify:




· Use the MQIMSVS format for msgs destined for the OTMA bridge. ( http://www-01.ibm.com/support/docview.wss?uid=swg21607923 )

· Remember that the MQIIH structure is fixed length (84 bytes, or x'54') and it is part of the payload or user data portion of the message.

· Messages need to be in the expected format for IMS to successfully process them: LLZZ TRANCODE DATA

· We use CCSID 037 (x'25')/ Encoding 785 (x'311') for our traffic from distributed to z/OS

· Enable character set conversion in the channel via the CONVERT=YES parameter in your channel definition. Since there is no application prior to the OTMA bridge doing an 'MQGET', let the channel do the work.





These are some of the 'gotchas' that I have come across and should get you going in the right direction.





Good Luck!


Art










Image removed by sender.





Image removed by sender.


Arthur Schanz
Distributed Computing Spec
Messaging and File Transfer
701 East Byrd Street
Richmond, VA 23219
Phone: 804.697.3889
Cell: 804.640.3132
Email: ***@frit.frb.org





















List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************





List Archive - Manage Your List Settings - Unsubscribe

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
************************************************************

To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
************************************************************
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
*******************

Loading...