problem with sequential file

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
vcannadevula
Charter Member
Charter Member
Posts: 143
Joined: Thu Nov 04, 2004 6:53 am

problem with sequential file

Post by vcannadevula »

Hi all,
I am trying to write to a hash file from a sequential file.I have uploaded the text file to AIX and this file has 2 columns and 17 rows.First column is defined as key column ,it is an integer.Second column is char.

When i try to view data I am getting an error msg and then displaying data.If i run the job , it is aborting giving the following error message:

DDPR7300REPNAMELKP..DDPRMtrcReports.MtrcRepNames: read_delimited() - row 18, column (Second Column Name), required column missing
Plz let me know the reason
Thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You are reading records from a sequential file which has field delimiters. For the 18th row, you may have missed the delimiter and hence DataStage says that the second column is missing.

Please try to locate the delimiter in the 18th row. Also check whether you have your 'first line is column header' option ticked on as it may then represent a different line - probably 19th.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you moved the file from DOS to Unix, then you may have a Control-Z character at the end of the file. If you did a binary FTP, then it preserved the DOS formatting.

Your choices are easy:

1. It's a small file, fix it using VI.
or
2. If not a onetime load but you will have to deal with it repeatedly, write a ksh script and use SED to strip offending characters
or
3. Setup the Sequential stage to ignore rows of incomplete data.
or
4. Create the file created in a manner that doesn't break your job.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vcannadevula
Charter Member
Charter Member
Posts: 143
Joined: Thu Nov 04, 2004 6:53 am

Post by vcannadevula »

There are only 17 rows in the text file and all the rows are written to hashfile when i ran the job (though the job is aborted)
Abort is because of 18th row which is not there is the text file.I am uploading in it Ascii.
Alexandre
Participant
Posts: 12
Joined: Fri Dec 31, 2004 5:04 am
Location: Paris
Contact:

Post by Alexandre »

Have you checked for trailing blank lines ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Check whether you have a newline character at the end-of-file. This sometime makes DataStage to think that there is another extra line (with some data, which is false).
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Use your unix od -xc command to see what is actually at the end of the file.

However, here is your work around. On the columns tab of the sequential stage, scroll to the right. Change the value of Incomplete column from Error to Discard & Warn. You will have to do this for each column.
vcannadevula
Charter Member
Charter Member
Posts: 143
Joined: Thu Nov 04, 2004 6:53 am

Post by vcannadevula »

Hi all,

Thank You very much
Post Reply