import error while importing a fixed width file.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

import error while importing a fixed width file.

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 »

All string columns are ideally of type Char (not VarChar).
Set the Format property to "fixed width" (Format tab).
Use the Display Width setting to specify the actual width of each column.
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

importing data from fixed width file.

Post by san_deep »

i 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}.
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