Page 1 of 1

Padding NULL to string

Posted: Mon Aug 25, 2008 8:40 am
by ds2000
While creating a sequential file strings are padded with NULLs. I want to remove those nulls before loading to table.

Although its for parallel jobs but i tried to set following property as well but it didnt work: APT_STRING_PADCHAR 32x0

Posted: Mon Aug 25, 2008 8:58 am
by girija
Hi,
As per my knowledge, you can't write NULL in sequential file. I think you mean trimmed values stored in sequential file and you want to pad spaces when you load into oracle table. If so try with field type as char with proper length and define APT_STRING_PAD_CHAR as 0x20.

Posted: Mon Aug 25, 2008 9:11 am
by ds2000
APT_STRING_PAD_CHAR is not Parallel property?
Can it be used used in server job as well ?

Posted: Mon Aug 25, 2008 3:39 pm
by ray.wurlod
APT_STRING_PADCHAR is for parallel jobs only. Use Convert() to remove any Char(0) values, and Fmt() to generate space padding. For example, if the output field is 15 characters wide

Code: Select all

Fmt(Convert(Char(0)," ",InLink.ColName),"15L")