delete an empty row

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
satisht
Participant
Posts: 15
Joined: Tue Nov 07, 2006 4:41 pm

delete an empty row

Post by satisht »

hai
i just have a problem here guys
i am getting an empty row as the first row when i use the sort stage and i want to delete it(imp thing is there is an empty in the input file)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Limit it from getting to the sort. Use a filter on the Sequential File stage that reads the file, using grep or awk to bypass the empty line.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Hi,

Since you are on Windows, you can use a transformer to filter the empty row.

If you have MKS tool kit, then I guess you can grep or awk like Ray suggested. I'm not sure about the utility of MKS toolkit.

Does having MKS tool kit help us in using grep and awk functions in Windows environment?

Thanks,
Whale.
Last edited by I_Server_Whale on Tue Nov 07, 2006 6:12 pm, edited 1 time in total.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

If you are sure that you are getting just one empty row in your flat file, you can do this

Include a Transformer between the input file and the Sort stage.

Add a constraint @INROWNUM>1 in your Transformer. you will get your desired result.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Most of the UNIX-on-Windows products give access to the full range of frequently-used UNIX commands. Recently I astounded some folks by opening a CMD shell, typing in SH as a command, then displaying man pages!

I do err, however, in assuming that everyone has one of these, because they can be had for free.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... the Astounding Ray! :D
-craig

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