EBCDIC to ASCII packed decimals with a NULL value

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Posts: 2
Joined: Thu Feb 16, 2006 12:10 am

EBCDIC to ASCII packed decimals with a NULL value

Postby IT.Help@WH-Ireland » Thu Feb 23, 2006 8:34 pm

We're converting numerous EBCDIC tables to ASCII with great success. Almost all packed and zoned decimals are converting perfectly.

The only issue is when an EBCDIC packed decimal being filtered, instead of being zero '0', is in fact NULL. When NULL is found, TextPipe Pro translates this into an ASCII value of the numbers '4' and '0' repeated.

For example, if the filter is instructed to expand a packed decimal of 4 bytes with 0 implied decimal places, and the EBCDIC data is NULL, TextPipe Pro returns '+4040404'. If the packed decimal is 8 bytes with 2 implied decimal places, then the filter returns '+4040404040404.04'.

Sadly, we can't always assume that a string of 4's and 0's is always wrong - there's a million-to-one chance it could be a genuine number. We really need TextPipe Pro to deal with the NULL's properly - maybe by returning NULL or zero.

Any advice or help would be greatly appreciated.

Many thanks.

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Postby DataMystic Support » Tue Feb 28, 2006 2:28 pm

If you could send us a sample file and copybook we'd be happy to look at it. We've just spent a lot of time searching for references to storage of null values, but have come up with nothing.

It's quite possible that codes above '9' in the lower nybble are used to indicate a NULL, in which case we can easily detect it.

Should the filter be outputting blanks, zeroes, 'NULL' or something else?, keeping in mind that we'd prefer to keep the field length constant.

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 6 guests