multiple conditions in filter stage

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
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

multiple conditions in filter stage

Post by hitmanthesilentassasin »

Hi,


I am trying to define conditions like the one's below.

Col1="XXXX" and #Var1#="YYY"

where var1 has got the value YYY, for which i am getting the error

Expected YYY in the schema.

can you help me define this conditions?

Thanks
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Is #Var1# is a job parameter?
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

Yes it is
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Check the datatype of Var1 job parameter. Check if it is String.
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

yes it is a string.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Hi I happened to read the manual for filter stage... please check below.

The operation of the filter stage is governed by the expressions you set in the Where property on the Properties Tab. You can use the following elements to specify the expressions:

Input columns.

Requirements involving the contents of the input columns.

Optional constants to be used in comparisons.

The Boolean operators AND and OR to combine requirements


So according to it we cannot use job parameter to compare..
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Why not use a transformer to filter the data? You can give the conditions in the link constraint.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Yes thats right...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can certainly use job parameters in simple conditions in a Filter stage - I have not checked a compound condition (one with And or Or) but can not imagine there would be any difficulty. However, it can be finicky with quote characters - try using single quotes rather than double quotes, for both dates and strings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_sai
Participant
Posts: 27
Joined: Wed Oct 31, 2007 12:22 pm

Post by ds_sai »

Hi,

Can u please check whether RCP is enabled or not?

Cheers
ds_sai
Post Reply