Page 1 of 1

input file values not being populated in output file

Posted: Fri Feb 20, 2009 1:15 am
by dnat
Hi

I am reading 4 datasets, combining them through funnel and doing some datamanipulations using a transformer and then output the values in the output file(fixed width file)

My problem is that

From the input file the number of records are coming. But except the first column value others are not coming. it is being set as null..what could be the reason.

Posted: Fri Feb 20, 2009 2:44 am
by dnat
Actually i could see the file while open it with textpad with all the contents..i think the null is creating the problem..
I have char as the target field types as it is a fixed width..I am using APT_PADCHAR and set it to ox20..but i think the padding is not happening properly..what can i do to pad it with spaces..

Posted: Fri Feb 20, 2009 3:48 am
by Kirtikumar
Are you getting any warning or error message in the logs when the job finishes?

Try function like NullToValue or set the file properties for null handling.

Posted: Fri Feb 20, 2009 6:47 am
by ArndW
The PADCHAR does not affect the reading of CHAR fields. If you do a "view data" in the Designer of your source file, what is displayed as the value of the second field and what is the correct contents according to your text editor?

Posted: Tue Feb 24, 2009 3:52 am
by dnat
I modified the job to explicitly include a space. i.e

if the width is 5 char
If isnull(xxx) then space(5) Else xxx:Str(' ',5-Len(xxx)).

But i expected this spaces to be padded in the char field since i included the APT_PADCHAR environment variable.

If you have any thoughts please let me know.

Posted: Tue Feb 24, 2009 6:42 am
by ray.wurlod
If you've already filled the field with five characters (space or otherwise) then APT_STRING_PADCHAR does not need to be invoked.