Not being able to import data from a fixed width flat

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
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

Not being able to import data from a fixed width flat

Post by san_deep »

I have to export the flat file which is fixed width.
I am new to data stage, please provide the info regarding the importing the data from Flat file having no delimiters n it is fixed width.

i am also getting this error:::Error validating import/export function
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set the Record Length property (in the Record level folder) to "fixed".
Make every string column Char rather than VarChar.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

Post by san_deep »

am doing both of the things and i am facing problem in "decimal" as i have changed all my numeric n integer data types to decimal for the data validation purpose.

the following error msg i am getting


When validating import/export function: APT_GFIX_Decimal::validateParameters: the decimal "text" format is variable length, and no external length is specified;

>you should possibly specify an appropriate "width" property; external format: {text, padchar=32, nofix_zero, precision=10, scale=0, round=trunc_zero, ascii}.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

read all the columns as CHAR and then convert them to decimal in the transformer as needed
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

Post by san_deep »

thats also not working,

can any help in that?

thanks in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Could you explain "not working"? Your errors should be different with fixed width columns.
michaeld
Premium Member
Premium Member
Posts: 88
Joined: Tue Apr 04, 2006 8:42 am
Location: Toronto, Canada

Post by michaeld »

I've seen this question posted many times and there were no complete answers. So I'm writing this for the sake of closure:

Importing fixed width decimal columns

Set these properties in the sequential file stage:

in the Format tab:

1)right click
2)select "Format as"
3)select "fixed-width records"

in the Columns tab:

For each Decimal column you need to set the expected field width.
To do this you double click on the gray button that indicates the
column number and it will bring up the "edit column meta data window".

In the properties section under the Decimal type branch, add the "Field width"
property and set it to the size of your decimal meta data. Example: If your decimal
is length:5 scale:2 then the width will be 7.

5 for whole number part
2 for decimal part
1 for the decimal (.)
1 for the sign (+/-)

I hope that helps.
Mike
Post Reply