601 Flat File via MQ with packed decimal fields

I need a little help putting together a webMethods solution. We have a mainframe process that will be posting a flat file as the payload of a WebSphere MQSeries message. The message will be posted in EBCDIC, and contains a mix of alphanumeric and packed decimal (BCD) fields.

While testing the WmFlatFile definition for the payload, webMethods requires a “Encoding” to be selected. I have been using CP037, which correctly translates the alphanumeric fields, but corrupts the packed decimal fields.

In an attempt to correct for this, I’ve written a FormatService that calls stringToBytes (using CP037) followed by bytesToString (using ASCII), in hopes of re-intepreting the corrupted fields. While many of my values are successfully restored, I’ve noticed that the sequence 0x00 0x8C is not correctly restored. Those are the actual bytes as received from the mainframe. The end result from webMethods becomes 0x00 0xFF 0xFD, which surprises me to no end.

Any insight would be greatly appreciated.

I had a similar problem with french characters and we ended up writing a java service to do character replacements for certain characters not translating properly. If you haven’t found a solution yet I suggest going that route for now.