Bad record delimiter Fixed width length "\n" got &
Moderators: chulett, rschirm, roy
Bad record delimiter Fixed width length "\n" got &
Bad record delimiter Fixed width length "\n" got " "
trying to load fixed width file thru sequential file
but getting the above error.
Im sure the record lenth is correct.
I beleive the mode of file transfer is wrong.
when i tried to check the file format in unix its showing-English text
How can i change the file into Ascii text.
Can anyone help me.
trying to load fixed width file thru sequential file
but getting the above error.
Im sure the record lenth is correct.
I beleive the mode of file transfer is wrong.
when i tried to check the file format in unix its showing-English text
How can i change the file into Ascii text.
Can anyone help me.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The problem is in the first line of your file (record 0).
Please post both the record schema and the first line of the file.
Surround each (separately) with Code tags please. It makes it easier to count characters if you do so.
Please post both the record schema and the first line of the file.
Surround each (separately) with Code tags please. It makes it easier to count characters if you do so.
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.
schema record
{record_delim='\n', record_length=fixed, delim=none}
(
A:nullable string[1] {width=1};
B:nullable string[5] {width=5};
C:nullable string[5] {width=5};
D:nullable string[30] {width=2};
E:nullable string[9] {width=1};
F:nullable string[3];
)
The first line of record is below
abc 32123ffcscfdscsddsfcsdcsdcsdccdscds df
when i tried to run im getting the below error
Bad record delimiter after fixed-length record: expected "\n", got "d"
Import error at record 0.
The runLocally() of the operator failed.
{record_delim='\n', record_length=fixed, delim=none}
(
A:nullable string[1] {width=1};
B:nullable string[5] {width=5};
C:nullable string[5] {width=5};
D:nullable string[30] {width=2};
E:nullable string[9] {width=1};
F:nullable string[3];
)
The first line of record is below
abc 32123ffcscfdscsddsfcsdcsdcsdccdscds df
when i tried to run im getting the below error
Bad record delimiter after fixed-length record: expected "\n", got "d"
Import error at record 0.
The runLocally() of the operator failed.
-schema record
{record_delim='\n', record_length=fixed, delim=none}
(
A:nullable string[1] {width=1};
B:nullable string[15] {width=15};
C:nullable string[2] {width=2};
D:nullable string[8] {width=8};
E:nullable string[8] {width=8};
F:nullable string[5] {width=5};
G:nullable string[13] {width=13};
H:nullable string[1] {width=1};
I:nullable string[3] {width=3};
J:nullable string[8] {width=8};
K:nullable string[7] {width=7};
L:nullable string[5] {width=5};
M:nullable string[20] {width=20};
N:nullable string[44] {width=44};
O:nullable string[1] {width=1};
P:nullable string[6] {width=6};
Q:nullable string[8] {width=8};
R:nullable string[15] {width=15};
S:nullable string[80] {width=80};
)
This is another fixed width file record schema.
when i run this im not getting any error like bad record.
can any one suggest me pls?
{record_delim='\n', record_length=fixed, delim=none}
(
A:nullable string[1] {width=1};
B:nullable string[15] {width=15};
C:nullable string[2] {width=2};
D:nullable string[8] {width=8};
E:nullable string[8] {width=8};
F:nullable string[5] {width=5};
G:nullable string[13] {width=13};
H:nullable string[1] {width=1};
I:nullable string[3] {width=3};
J:nullable string[8] {width=8};
K:nullable string[7] {width=7};
L:nullable string[5] {width=5};
M:nullable string[20] {width=20};
N:nullable string[44] {width=44};
O:nullable string[1] {width=1};
P:nullable string[6] {width=6};
Q:nullable string[8] {width=8};
R:nullable string[15] {width=15};
S:nullable string[80] {width=80};
)
This is another fixed width file record schema.
when i run this im not getting any error like bad record.
can any one suggest me pls?
To me it looks like since the record type is fixed, datastage is reading the record length number of characters. Now, there should be spaces for the columns E and F in the first record since they are null, but if there are none, datastage will read upto the second record and then look for a record delimiter. Since it has already passed to the second record it is finding a D wherever it stopped reading.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Take a look at your data record based on the widths in the record schema. That these widths are specified means that this is how DataStage is parsing the record. In particular D will take only two characters from the record, and be padded with 28 pad 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: