Issue Reading from 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
meet_deb85
Premium Member
Premium Member
Posts: 132
Joined: Tue Sep 04, 2007 11:38 am
Location: NOIDA

Issue Reading from Fixed width file

Post by meet_deb85 »

I have my source data as follows: -

10Pending
20Hold


the width for the fisrt field is 2 and second is 10, I have added space char after the data in the second field to make it 10 characters long.

I have set the Record Length as fixed, and i have defined under the string type option in the extended columns property tab as Field Width=2 and Field Width=10 for respective columns.

But I am still getting the following error : -
Seq_Load_Profile: Unable to initialize the importer.

Seq_Load_Profile: "record_length=fixed" (no length given) and record field format is variable-length. The first variable-length field is "Field001".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Make both data types Char. Char(2) and Char(10). Do not use 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.
meet_deb85
Premium Member
Premium Member
Posts: 132
Joined: Tue Sep 04, 2007 11:38 am
Location: NOIDA

Post by meet_deb85 »

hi Ray,

I have kept it as Char(2) and Char(10), but still getting the same error
meet_deb85
Premium Member
Premium Member
Posts: 132
Joined: Tue Sep 04, 2007 11:38 am
Location: NOIDA

Post by meet_deb85 »

Resolved it by setting Record Delimiter as UNIX NewLine
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

I think you keep 'varchar' with 'fixedwidth' it will work

Regards
Sreeni
Post Reply