Page 1 of 1

Error in reading fix length sequential file

Posted: Fri Apr 01, 2005 1:40 pm
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.

Re: Error in reading fix length sequential file

Posted: Fri Apr 01, 2005 2:53 pm
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.

Posted: Fri Apr 01, 2005 3:34 pm
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.

Posted: Thu Apr 07, 2005 2:54 pm
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