Page 1 of 1

Sequential file viewing problem

Posted: Wed May 07, 2008 6:17 pm
by abc123
I am using a sequential file stage to view the sequential file. I have the following properties set:

--------------------------------------------------------------------------------------
TRY1:
-----
Record Level:
Final delimiter = none
Record delimiter string = \r\n

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\r\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------
TRY2:(the \r\n are replaced by DOS format automatically)
-----
Record Level:
Final delimiter = end
Record delimiter string = \r\n

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\r\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------
TRY3:
-----
Record Level:
Final delimiter = end

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------

I also did the following:

1)Removed all Quote=None from Field Level in Edit Column Meta Data window.
2)Did od -xc on the file. All columns are separated by \t. Each line ends with \r\n.
3)Went through the posts.

This file was imported from Windows to Unix. I would appreciate anyone's help.

Posted: Wed May 07, 2008 7:37 pm
by ray.wurlod
Is the FINAL line properly terminated? DataStage is complaining that end of file was encountered unexpectedly.

Posted: Wed May 07, 2008 8:15 pm
by abc123
I tried with:
Final Delimiter=none
and
Final Delimiter=end

Both errored out. Doesn't the error seem like it encountered EOF before it encountered the first \r\n?

Posted: Wed May 07, 2008 10:00 pm
by devidotcom
Is this a fixed width file or a delimited file?

Posted: Wed May 07, 2008 11:56 pm
by ray.wurlod
Final delimiter is not the same thing as the record terminator. Final delimiter is a special property in case there is an extra delimiter between the final field and the end of the line. I may have mislead you by using that word. What I meant to ask was whether the last line in the file has its own record terminator or whether that record (line) terminator is absent.

Re: Sequential file viewing problem

Posted: Thu May 08, 2008 4:39 am
by tsn
abc123 wrote:I am using a sequential file stage to view the sequential file. I have the following properties set:

--------------------------------------------------------------------------------------
TRY1:
-----
Record Level:
Final delimiter = none
Record delimiter string = \r\n

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\r\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------
TRY2:(the \r\n are replaced by DOS format automatically)
-----
Record Level:
Final delimiter = end
Record delimiter string = \r\n

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\r\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------
TRY3:
-----
Record Level:
Final delimiter = end

Field Defaults:
Delimiter = tab

I get the following error when I try to View Data (by the way when I save and come back, the \r\n are
replaced by DOS format automatically):

Missing record delimiter "\n", saw EOF instead
Import warning at record 0
Delimiter for field "Col1" not found; input:

--------------------------------------------------------------------------------------

I also did the following:

1)Removed all Quote=None from Field Level in Edit Column Meta Data window.
2)Did od -xc on the file. All columns are separated by \t. Each line ends with \r\n.
3)Went through the posts.

This file was imported from Windows to Unix. I would appreciate anyone's help.
Pls chk your file has Contorl^M characters at end of all records..... this may happen while transferring the file.

I hope it is delimeted file. pls chk your las record too whether it is properly ended or not

Posted: Thu May 08, 2008 8:40 am
by abc123
This is the strangest part of this! Sometimes it'll work completely fine, that is, load without any problems and sometimes it won't work at all. On the exact same file, exact same settings. I didn't make any changes at all and now it is working fine. I am sure it has to do something with the OS I am using.