unable to view the records

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

unable to view the records

Post 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
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Post by rafidwh »

well it is fixed width column and the metadat was imported from a cobol file
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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)).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Post by rafidwh »

No guru the record is fine no empty lines
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: unable to view the records

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

"You can never have too many knives" -- Logan Nine Fingers
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post 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
Rob Wierdsma
Toronto, Canada
bartonbishop.com
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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. :)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Post 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
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post by rwierdsm »

Are you trying to read using a sequential file stage or a complex flat file stage?

Rob W
Rob Wierdsma
Toronto, Canada
bartonbishop.com
rafidwh
Participant
Posts: 179
Joined: Mon Oct 10, 2005 11:30 pm

Post by rafidwh »

sequential file stage
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post 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.
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Post Reply