Page 1 of 1

Using Transform in Trigger expression

Posted: Thu Apr 12, 2007 9:45 am
by Juls
Hi,

I have a sequence job where a Nested Condition stage has multiple custom Trigger expressions for multiple links. I call it my decission point.

Each expression uses a transform to get the result and based on the result I will continue.

Expressions looks like this:
UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL', 2) = 'OK' and UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL_PLANFORECAST', 2) = 'OK'

When I compile the job I get the following error and I can not figure out what it doesn't like. I tested these parameters in the UtilityHashLookup routine and they work fine giving the correct result:

1314 If (UtilityHashLookup("ha_EDW_FAC_ACCURACY", 'FAC_FULFILLMENT', 2) = 'OK') Then GoTo L$V112S5$START

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
1316 If (UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL_PLANFORECAST', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FULFILLMENT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_HEADCOUNT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_COMMITMENT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_ACTUAL', 2) = 'NOT OK') Then GoTo L$V0S123$START

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
1318 If (UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL', 2) = 'OK' and UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL_PLANFORECAST', 2) = 'OK') Then GoTo L$V0S137$START

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
1320 If (UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL_PLANFORECAST', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FULFILLMENT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_HEADCOUNT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_COMMITMENT', 2) = 'NOT OK' Or UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_ACTUAL', 2)= 'NOT OK') Then GoTo L$V106S0$START

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
1322 If (UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL', 2) = 'OK' and UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FINANCIAL_PLANFORECAST', 2) = 'OK' And UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_FULFILLMENT', 2) = 'OK' And UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_HEADCOUNT', 2) = 'OK' And UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_COMMITMENT', 2) = 'OK' And UtilityHashLookup('ha_EDW_FAC_ACCURACY', 'FAC_COSTCENTER_ACTUAL', 2) = 'OK') Then GoTo L$V105S0$START

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
Array 'UtilityHashLookup' never dimensioned.

6 Errors detected, No Object Code Produced.
(seq_MASTER_FULL_LOAD)

Posted: Thu Apr 12, 2007 10:13 am
by kris007
Do you have any other jobs which use a Nested Condition Stage? If so, do they compile correctly? I had the same problem more than a year back at a different client where we had to apply a patch. I can't remember what the patch is but I should have a post somewhere here which has the name of the patch. Search is you friend. :wink:

Posted: Thu Apr 12, 2007 10:32 am
by Juls
Yes, I have other jobs which use a Nested Condition Stage. However, they do not make a call to a transform. They just look at the result of another stage.

Posted: Thu Apr 12, 2007 11:22 am
by Juls
Kris,
I found your post about the patch and searched Ascential's knowledge base for both dll name and "nested condition" but came up with nothing relevant. Can you please find the ecase number you used?

Thanks.

Posted: Thu Apr 12, 2007 11:42 am
by kris007
As it was at a different client at that time I am not aware of the ecase number. I am sorry I could not be of more help.

Posted: Thu Apr 12, 2007 11:56 am
by DSguru2B
Contact support. They might be able to direct you in the right direction.

Posted: Thu Apr 12, 2007 2:44 pm
by ray.wurlod
Try using DSU.UtilityHashLookup instead of UtilityHashLookup.

Try using the Trans() function instead. It's more efficient for performing a key-based lookup against a hashed file that's been named in VOC.