Spaces in the 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
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Spaces in the File

Post by dodda »

Hello

I have a scenario where my input File is delimited by ; and i need to produce a fixed width file.
I am using seqfilestage---colimport stage---transformer-seqfile
My input File looks like below with each field delimited by ;
abc;def;ghi,jkl

now iam parsing the four Feilds via Column import stage as 4 fields
The format i have mentioned in the format tab of the column import stage is
Final Delimiter=end
Field Delimiter=;
In the Column Import stage the SQL type i mentioned as Varchar

After parsing via Col Import stage and trimming each and every field in the transformer i still get one extra space at the end of every field.
Is it common if so how to delete those spaces.

thanks
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

The output i am getting in the target seq file is
abc def ghi jkl
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Fixed-width files don't have field delimiters, what happens if you remove that property all together?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Hi Chulett,
My source File is ; delimited File.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not talking about your source, but I see I misread your post anyway. You say you need to produce a "fixed width file" so we need to know what properties you have set in the target sequential file stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

hi chulett,

I have mentioned the Final delimiter=end. I havent used any field defaults.
HariK
Participant
Posts: 68
Joined: Thu May 17, 2007 1:50 am

Post by HariK »

Could you post the metadata of the target sequential file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set the Field Width property for each of these fields.
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