Additional record in file on UNIX

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
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Additional record in file on UNIX

Post by vinaymanchinila »

Hi ,
I am extracting data from Oracle8i and writing to a flat file on UNIX. When I monitor the job it says "Finished, 117056 records writtten", but when I go to Unix and find out the word count (wc -l) it gives me 117057 , one record is totally blank(The file is loaded into SAP BW, and it is failing because of the balnk record).
Have no idea how it is getting generated and how do I spot it. If I restrict the job to 10,000 records I dont have this issue! it writes exactly 10K records and the word count is also 10K.

Thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try enabling the 'Omit last new-line' option in the Sequential File stage and see if that solves it for you.

Edit: I don't see how that jibes with the "If I restrict the job to 10,000 records I dont have this issue!" comment. :? Still, curious to see if it helps.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

We use the BW plug in stage which generates this flat file to be loaded in to SAP later on. So dont have the flat file options in this stage Craig!
Thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh. Dang. Sorry, I was under the impression you were writing out directly to a flat file and then pushing the flat file up into SAP with the BW plug-in thing. I've got no clue how that works, never having had the pleasure of working with SAP and DataStage.

Hopefully someone can steer you in the right direction.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

I have downloaded the file and looked at it. There is one serial number which is giving the issue, it has "," in the values and it is bumping the other fields into next ones.
I did use TRIM(in.col3,",","") to replace the commas by space but looks like its not working.
If I extract expect for this value its fine!
Any help on what else it might be, I did check in SQL Plus, the value has looks normal expect that some have commas .
Thanks,
Post Reply