Page 1 of 1

Bad record delimiter Fixed width length "\n" got &

Posted: Wed Jul 23, 2008 7:19 am
by laknar
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.

Posted: Wed Jul 23, 2008 7:23 am
by chulett
Post the actual, complete, unedited error. Also curious what you believe the difference between "English text" and "Ascii text" to be. :?

Posted: Thu Jul 24, 2008 12:11 am
by laknar
Error reading on import.
Bad record delimiter after fixed-length record: expected "\n", got " "
Import error at record 0.
The runLocally() of the operator failed.

The Fatal errors im facing

Posted: Thu Jul 24, 2008 1:00 am
by ray.wurlod
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.

Posted: Thu Jul 24, 2008 6:29 am
by laknar
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.

Posted: Thu Jul 24, 2008 7:10 am
by laknar
-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?

Posted: Thu Jul 24, 2008 8:50 am
by sud
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.

Posted: Thu Jul 24, 2008 3:16 pm
by ray.wurlod
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.

Posted: Fri Jul 25, 2008 4:58 am
by laknar
Hi,

Thanks for your input.
I have widths and its working fine.

Posted: Fri Jul 25, 2008 7:11 pm
by ray.wurlod
Please mark the thread as Resolved