Sequential file viewing problem

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Sequential file viewing problem

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the FINAL line properly terminated? DataStage is complaining that end of file was encountered unexpectedly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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?
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Is this a fixed width file or a delimited file?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Re: Sequential file viewing problem

Post 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
with regards,
tsn
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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.
Post Reply