Importing Sequential File error
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Hi Chulett.
The file is not a fixed-width one, it has delimiters between the fields.
Follow the file structure:
FIELD 1 ... integer (10)
FIELD 2 ... char (25) - changed to 'varchar'
FIELD 3 ... varchar (40)
FIELD 4 ... integer (10)
FIELD 5 ... char(15) - changed to 'varchar'
FIELD 6 ... decimal (13,2)
FIELD 7 ... char (10) - changed to 'varchar'
FIELD 8 ... varchar (117)
The file is not a fixed-width one, it has delimiters between the fields.
Follow the file structure:
FIELD 1 ... integer (10)
FIELD 2 ... char (25) - changed to 'varchar'
FIELD 3 ... varchar (40)
FIELD 4 ... integer (10)
FIELD 5 ... char(15) - changed to 'varchar'
FIELD 6 ... decimal (13,2)
FIELD 7 ... char (10) - changed to 'varchar'
FIELD 8 ... varchar (117)
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What's the bet that this file was created on a Windows system and lines are terminated with CRLF? Try changing format to use Record Delimiter String property set to "DOS style".
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.
Am I incorrect in stating that the error message implies an attempt to import a fixed-width file? Or at least what the stage believes to be a fixed-width file? Reading a delimited file does not entail needing to know the exact byte count of the record, instead it reads to the end-of-record mark and parses based on the delimiter.
And if the record delimiter was wrong, seems to me it would think it was one character too long rather than one too short...
[shrug]
And if the record delimiter was wrong, seems to me it would think it was one character too long rather than one too short...
[shrug]
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: