Read_delimited() – row 1198231,column DEPT, required column

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
Christina
Participant
Posts: 34
Joined: Wed Sep 06, 2006 11:50 am

Post by Christina »

Hi,

Can you give a unix command to delete a particular row from a file.

I will delete this row and try running. so that i can confirm whether problem lies only in this record or i am missing something else.
ralleo
Premium Member
Premium Member
Posts: 21
Joined: Mon Dec 11, 2006 9:05 am
Location: London

Post by ralleo »

Is row 1,198,231 the last row in the file?

Anyway you can do this.

1. $ head -n 1198230 <inputfilename> > <outputfilename>
This will give you all the rows except the one that it fails on.

If after running, this does work, then you have badly a delimited file, where one of the columns hasnt got a comma, hence getting the error message
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Within the Columns grid in the Sequential File stage you can scroll right and find a place where you can set up a "missing value" rule. Try changing that rule for DEPT to Replace, so that the job does not fail.

But, yes, you do need to check the file itself and verify whether there are too few delimiters in the line in question.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Christina
Participant
Posts: 34
Joined: Wed Sep 06, 2006 11:50 am

Post by Christina »

That line is not my last line.

but i tried running that job after removing that line. then it gave the same error in someother column.

I am running with some 100 records now.

i have to check whether it is running fine. :(
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to not be removing lines and instead determine the exact nature of the problem and if it is possible to read the file properly. Some badly formated delimited files can be... problematic and should be returned to sender. :wink:

Otherwise, these turn out to be 'normal' issues you need to learn how to handle. How about posting some sample lines from the file? Good ones and then problem children as well. Posting the current version of your error(s) would help as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply