Using Transform in Trigger expression

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
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Using Transform in Trigger expression

Post 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)
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post 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:
Kris

Where's the "Any" key?-Homer Simpson
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post 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.
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post 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.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post 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.
Kris

Where's the "Any" key?-Homer Simpson
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Contact support. They might be able to direct you in the right direction.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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