Hoew to populate blank Spaces in Seq 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
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Hoew to populate blank Spaces in Seq File.

Post by ambasta »

Hi All,
Source is oracle and Target is Sequential fixed width file.if any null data is coming then we need to populate those many no. of blank spaces as it is defined in file.I have having this constrain in around 100 fields.what to do???
can anyone plz help me???

Thanks.
ambasta
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

select the Null field value option in sequential file in format tab set it as ' ' with no. of spaces depending upon ur col width
hi sam here
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

samsuf2002 wrote:select the Null field value option in sequential file in format tab set it as ' ' with no. of spaces depending upon ur col width
Thanks for your kind Input,but i am having this constrain for around 100 field.All fields are having different length,this means i will have to set Null Field Value at column level,that is very tedious.Is there any other way out.
ambasta
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you define your output columns as fixed char with the appropriate widths, DataStage will implicitly perform the character conversion and add the space padding. But in order to do so you need to explicitly declare the lengths.
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

ArndW wrote:If you define your output columns as fixed char with the appropriate widths, DataStage will implicitly perform the character conversion and add the space padding. But in order to do so you need to exp ...
Hi Arnd,
Output column is fixed as this is a fixed width file having CHAR.i am setting NULL FIELD VALUE as ' '.but this is not working for me.
ambasta
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I just re-read the post and realized that I misunderstood the question regarding nulls vs. normal padding. My mistake. I'm not at a DS enable computer now, but I was fairly certain that the row attributes have some setting letting the string be padded. If someone else doesn't give a solution I'll see what that setting is tomorrow.
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

No Issues Arnd, whenever you will get a chance to look into it please give a trial and let me know the solution??
Thanks.
ambasta
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ambasta wrote:
samsuf2002 wrote:select the Null field value option in sequential file in format tab set it as ' ' with no. of spaces depending upon ur col width
Thanks for your kind Input,but i am having this constrain for around 100 field.All fields are having different length,this means i will have to set Null Field Value at column level,that is very tedious.Is there any other way out.
Sometimes you just have to tolerate tedious.

The only alternative is to hack the Repository, which is only for the arrogant and foolhardy.
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