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.
Error in reading fix length sequential file
Moderators: chulett, rschirm, roy
Re: Error in reading fix length sequential file
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.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 75
- Joined: Tue May 13, 2003 4:14 am
- Location: California
- Contact: