Page 1 of 1

How to treat NULLs in EBCDIC fields

Posted: Thu Oct 19, 2006 5:16 pm
by Ian.Plumb
Hi,

The copy book I have for an EBCDIC file lists a field as being PIC XX. If the database contains a NULL in this field, when the extract occurs does the field contain two characters or one?

Do I need to Convert NULLs with their own filter as part of an EBCDIC conversion? If so, how do you know how many characters to replace the NULL with for a fixed length field?

Many thanks,

Ian P.

Posted: Thu Oct 19, 2006 9:52 pm
by DataMystic Support
Hi Ian,

A PIC XX field will be converted to two output characters.

A binary 0 on EBCDIC input gets converted to binary 0 on ASCII output. Is a NULL binary 0 in your field? (ie hex 00 00).