Getting some ASCII nulls in file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Getting some ASCII nulls in file

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

1) APT_STRING_PADCHAR is set to 0x00.
2) There is no CHR() function. You must use CHAR(0).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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.
jyothisdasms
Participant
Posts: 33
Joined: Wed May 19, 2010 12:15 am
Location: Pune

Post by jyothisdasms »

Try to use $APT_STRING_PADCHAR=0x20
" Dream like you will live forever, live like you will die today."
Post Reply