How to avoid blank row in 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
rck
Participant
Posts: 1
Joined: Fri Jul 01, 2005 3:28 am

How to avoid blank row in Sequential file

Post by rck »

Hi,

Some one could you please help me how to avoid blank row in Sequential file.


Thanks in advance,

rck.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

can use any of the follow
1) can use a transformer/filter to check all the colum for null
2) can use aggregator to group by any unique column and filter out the blank row
3) If every other rows are unique, can use Remove Duplicate Stage
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you mean a sequential file from which you're reading, or to which you're writing?

You can not avoid anything in a sequential file from which you're reading; the very nature of a sequential file is that you have to read past every byte to get to the next.

So you either have to pre-process the text file to remove the blank lines, or modify your DataStage job such that it ignores them.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Post by sumitgulati »

kumar_s wrote:can use any of the follow
1) can use a transformer/filter to check all the colum for null
2) can use aggregator to group by any unique column and filter out the blank row
3) If every other rows are unique, can use Remove Duplicate Stage
Kumar, just curious to know if we have any Remove Duplicate Stage in DataStage 7.5. I don't see it in the list of stages. Is it something you need to buy separately?

Regards,
-Sumit
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Sumit,

I believe that Remove Duplicate Stage is present only in the PX version (EE version) but not in the server edition. Guys, please correct me if I am wrong.

Thanks,
Naveen
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Post by sumitgulati »

pnchowdary wrote:Hi Sumit,

I believe that Remove Duplicate Stage is present only in the PX version (EE version) but not in the server edition. Guys, please correct me if I am wrong.

Thanks,
Naveen
Thanks Naveen.
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

Post by ranga1970 »

Yes; Remove duplicates fall in the PX

thanks
ranga
RRCHINTALA
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

Hi rck,


Input
SeqFile Stage--------->Transform Stage--------> Output

Pick one Primary Key Column from your Input file and defining Constraint on Transform Output Link

Example:
DSLink.Col > 0

This will eliminate Last New Line (blank row) in your input file

This trick worked for us.........hope it would work for you

Good Luck
Martin
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

martin wrote:Hi rck,


Input
SeqFile Stage--------->Transform Stage--------> Output

Pick one Primary Key Column from your Input file and defining Constraint on Transform Output Link

Example:
DSLink.Col > 0

This will eliminate Last New Line (blank row) in your input file

This trick worked for us.........hope it would work for you

Good Luck
Martin
i guess this is what i mentioned in my first point, can also use <> IsNull() function.
Post Reply