Avoid the EBCDIC blues – a toast to Jon Skeet

If you are a .Net person and a question of using EBCDIC ever comes up (usually followed by wrinkled brows) be the hero and check out  this library!

I am currently working on a project that receives data from an old behemoth of a mainframe application. They weren’t quite up to date on web-services, so instead I had to write a whole lot of WebSphere MQ interfacing – fun and challenging, but that’s quite another story.

Well, one of the mainframe apps is a COBOL batch job. Nowadays COBOL does know about XML, but that XML arrived over the MQ in EBCDIC format. So instead of struggling with decoding it on the mainframe side, I offered the mainframe people the possibly much less bureaucratic and time-consuming option to do the conversion at the .Net client end.

Being an old mainframe guy myself I already had some conversion code, written in C years ago and later converted to C#. But then I stumbled across a very elegant and very .Net’ish encoding library written by Jon Skeet, and I had the conversion set up and tested in less than an hour, most of which was spent playing with parameters and the surrounding code.

So may I propose a toast to mister Skeet!

Advertisements