Fixed Width 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
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Fixed Width file

Post by sheema »

In my Job ,the source file is fixed-width file with 30 columns.
But in some rows i see that there are just 26 columns and than the line terminator is placed
and in some rows i have all the 30 columns and than the line terminator.
When i declare my metadata i declare metadata for all 30 columns.
so i am not able to read the file.I am under the impression that
we cannot read this file successfully.Am i right,
or is there any way i can read this file.


Thanks
sheema
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not positive this will work with fixed-width files, but the 'missing' columns must be from the end of the record and not somewhere in the 'middle'. If that's the case, try enabling the 'Suppress row truncation warnings' option on the Format tab.

:!: Assuming this is a Server job as you've marked the post.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

Yes,this is server job.The columns which are missing are also the last 4 columns.But i have tried by enabling the ''Suppress row truncation warnings' ,but still i get warnings saying

read_fixedwidth() - row 1, column XXX, required column missing.
Than i selected 'replace' option from the Incomplete column.Now it is working.

Earlier i tried both these options individually but did not put them together.
Now it is working thanks.
Last edited by sheema on Fri Apr 13, 2007 10:26 am, edited 1 time in total.
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

You are trying to read data with less no.of columns in FF stage column grid.

Means: No.of columns in file are not matching No.of columns in FFstage column grid.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

sheema wrote:Now it is working thanks.
Excellent - please mark your post as Resolved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply