Sequntial File failing with grep command in filter.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
RaviReena
Premium Member
Premium Member
Posts: 68
Joined: Tue Jul 29, 2008 10:01 am

Sequntial File failing with grep command in filter.

Post by RaviReena »

Hi,

I am reading a a file using sequential stage with a grep command in Filter property.If there is no data in the file for my grep command , it is throwing an error :Filter Status 256.

But when there is no records I do not want my job fails throwing an error.

any help greatly appreciated.
Rao V
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change the command to detect file size and perform the grep conditionally upon that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RaviReena
Premium Member
Premium Member
Posts: 68
Joined: Tue Jul 29, 2008 10:01 am

Sequntial File failing with grep command in filter

Post by RaviReena »

Actually there are other records in the file which are not matching the grep command, In that case i can't check by file size right?

any suggestion Ray?
Rao V
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

grep twice, the second time conditional on the exit status of the first being zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RaviReena
Premium Member
Premium Member
Posts: 68
Joined: Tue Jul 29, 2008 10:01 am

Sequntial File failing with grep command in filter.

Post by RaviReena »

Can we pass the grep command twice on Filter property in sequential file file stage? If so can you tell me how to pass it like what is the syntax should looks like?
Rao V
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

grep command 1 && grep command 2
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply