input file values not being populated in output 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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

input file values not being populated in output file

Post 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.
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Post 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..
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post 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.
Regards,
S. Kirtikumar.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply