Error in reading fix length sequential 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
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Error in reading fix length sequential file

Post by nghadi »

All,

I'm getting following error while trying to view fix length sequential (UNIX flat) file in datastage.

Error: Bad record delimiter after fixed-length record: expected "\n", got "\x00"

I have set following properties for fix length file...

Record Level
Record Delimiter = UNIX Newline
Record Length = fixed

Filed Defaults
Delimiter = None

Well, I looked at data file on UNIX and it looks okay. Is there anything i'm missing?

Thanks for your help.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Re: Error in reading fix length sequential file

Post by bcarlson »

Sounds like the column definition may not match the file exactly.

Assuming this is an ASCII file with newline record delimiter, then the record-level and Field Default parameters look good. Double check your column definitions. The sum of the lengths of each field should total the overall record length (which should be the same for all recs).

For testing purposes, it is sometimes easier to import all the fields as character. Once everything is importing correctly, then you can start importing fields as their target datatypes (ex. changing the char(10) containing a date to date, length = 10, format = '%yyyy%mm%dd', etc.)

Since you can view the raw file, you should be able to validate the calculated record length.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

With fixed-width format the column widths must be correctly specified.

During import of thesequential file's "table definition" you enter the widths manually, as a comma-delimited list. Since this is a manual process there is scope for error.

The column widths in the file are stored as the Display Width field in the Columns grid. If one or more is incorrect, you can change them here.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Please look the OSH table definition of the input file. This should match with what you see by clicking the stage.

Regards
~Amitava
Post Reply