Page 1 of 1

Getting some ASCII nulls in file

Posted: Sun Oct 23, 2011 11:35 pm
by abc123
I am reading a flat file, doing two transformations to some columns (1. substring 2. splitting 8 character column into 4 columns) and writing back into a flat file. However, I am getting about 10 ascii nulls on every line.

Two questions:
1)Why am I getting them?
2)How do I get rid of them? Doing a a Trim with Chr(0) as the 2nd parameter is not an option as I have a very large number of columns.

Any ideas?

Posted: Mon Oct 24, 2011 7:15 am
by ray.wurlod
1) APT_STRING_PADCHAR is set to 0x00.
2) There is no CHR() function. You must use CHAR(0).

Posted: Mon Oct 24, 2011 9:06 am
by abc123
1)The default value for $APT_STRING_PADCHAR is 0x0 and that's what it is set to. I also tried with 0x00 and nothing, that is, empty value. Same result. I still get the ascii nulls.

2)I did mean char(0). However, I have a very large number of columns and this would not be an option.

Posted: Mon Oct 24, 2011 11:03 am
by jyothisdasms
Try to use $APT_STRING_PADCHAR=0x20