Problem Reading 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
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

Problem Reading Fixed width File

Post by umamahes »

Hi,

I am getting the following warning when i tried to reqad fixed width file with ASCII characters

Capitationtest..Sequential_File_0.DSLink2: read_fixedwidth() - row 66, column WK_MEMBER_NUMBER, column unexpectedly ended by EOR

In the sequential stage if i use line termination none then only i am able to read this file.when i do wc -l on unix it is showing 7000 records but it has 1 million records actually.so what is the problem.IF i use none as line termination i am able to view the data with out any warning.When i run the job with this option i am getting the following error.

Capitationtest..Sequential_File_0.DSLink2: read_fixedwidth() - row 607678, column WK_CARRIER, column unexpectedly ended by EOR
HI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is it possible that some of your data fields contain newline characters?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

Post by umamahes »

Some of the data fields are comp with ASCII values.

Even in unix if i issue head -1 Filename it is giving multiple records not a single record

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

Post by chulett »

In other words, yes. You'll need to enable the Contains Terminators option for those columns. Slide the Columns tab over the the right to see that particular option.

If you didn't have any data fields with newlines in them, then a "wc -l" for your file would return "1".
-craig

"You can never have too many knives" -- Logan Nine Fingers
klsrao
Participant
Posts: 7
Joined: Fri Oct 22, 2004 9:07 am

Re: Problem Reading Fixed width File

Post by klsrao »

It looks like you have 7000 line terminators only in your input file.
klsrao
Participant
Posts: 7
Joined: Fri Oct 22, 2004 9:07 am

Re: Problem Reading Fixed width File

Post by klsrao »

It looks like you have 7000 line terminators only in your input file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This could be a field called something like NOTES or COMMENTS - some freeform text field into which a user has typed Enter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
klsrao
Participant
Posts: 7
Joined: Fri Oct 22, 2004 9:07 am

Re: Problem Reading Fixed width File

Post by klsrao »

It looks like you have only 7000 line terminators (^M) in your input file.
Try removing all line terminators (^M) in your input file and set Line terminator none.

Lakshmi Srinivas


umamahes wrote:Hi,

I am getting the following warning when i tried to reqad fixed width file with ASCII characters

Capitationtest..Sequential_File_0.DSLink2: read_fixedwidth() - row 66, column WK_MEMBER_NUMBER, column unexpectedly ended by EOR

In the sequential stage if i use line termination none then only i am able to read this file.when i do wc -l on unix it is showing 7000 records but it has 1 million records actually.so what is the problem.IF i use none as line termination i am able to view the data with out any warning.When i run the job with this option i am getting the following error.

Capitationtest..Sequential_File_0.DSLink2: read_fixedwidth() - row 607678, column WK_CARRIER, column unexpectedly ended by EOR
Post Reply