Page 1 of 1

unable to view the records

Posted: Tue Jun 06, 2006 5:32 am
by rafidwh
Hi all,
when I am trying to view the data from my source flat file I am getting the error like "last column",column unexpectedly ended by EOR.
I checked my datafile field length and the record layout defined in the stage both counts are same.
I mean there is no problem with the datafile and the metadata defined
both lengths are also same

Suggestion required please

Thanks in advance

Posted: Tue Jun 06, 2006 6:09 am
by rafidwh
well it is fixed width column and the metadat was imported from a cobol file

Posted: Tue Jun 06, 2006 6:15 am
by ray.wurlod
Are you getting this message at row 0 or 1, or at a later row? If the former, check that the first line is not column names. If the later, check that row, ensuring that none of the columns contains a line termination character (Char(10)).

Posted: Tue Jun 06, 2006 6:37 am
by DSguru2B
I believe you have an empty line at the end. Do tail -2 and you will see only one record and one single blank line at the top.

Posted: Tue Jun 06, 2006 6:44 am
by rafidwh
No guru the record is fine no empty lines

Re: unable to view the records

Posted: Tue Jun 06, 2006 6:50 am
by chulett
rafidwh wrote:I mean there is no problem with the datafile and the metadata defined both lengths are also same
If that was true you wouldn't be seeing this message. :wink:

At least one of your records is 'short' and runs out of data before you run out metadata so to speak. Since you are dealing with a fixed width file, ensure you've put the correct column sizes in the 'Display' column as that is what drives the reading of the file.

Posted: Tue Jun 06, 2006 6:53 am
by rwierdsm
Rafidwh,

Do you have the file declared as a DOS file?

Look at the Line Termination section of the Stage tab. Ensure that the Unix Style (LF) radio button is checked.

Rob Wierdsma

Posted: Tue Jun 06, 2006 7:07 am
by DSguru2B
How exactly did you get the file onto the unix server. Did you NDM it straight from Mainframe. Or you saved it on a windows file server and then ftp'd it?
How did you ftp it. Did you use the internet explorer or command line?
If you used internet explorer then you need to run the command DOS2UNIX on the file. There could be many things, investigate and let us know. :)

Posted: Tue Jun 06, 2006 7:33 am
by rafidwh
Well the problem here is if iam defining the metadat manually i am able to view the data,but if I am importing the metadat from the cobol file definitions I am facing this problem which is very strange

both the metadata are same

Posted: Tue Jun 06, 2006 7:37 am
by rwierdsm
Are you trying to read using a sequential file stage or a complex flat file stage?

Rob W

Posted: Tue Jun 06, 2006 7:37 am
by rafidwh
sequential file stage

Posted: Tue Jun 06, 2006 7:42 am
by rwierdsm
Are you able to look at the file in a text editor that will allow you to look at the EOR characters?

If so, determine whether the record ends with just x0A (UNIX) or x0D0A (DOS).

If it is the latter, your FTP has not transferred the file in the proper format.

Sorry if I'm belabouring this point, but everytime I've had this error, it has been because of those pesky EOR indicators.

Rob W.