UtilityHashLookup calling
Moderators: chulett, rschirm, roy
UtilityHashLookup calling
Hi All,
when i am calling UtilityHashLookup function in my routine , it alwas return space ... my code is
Deffun UtilityHashLookup(A1,A2,A3) Calling "DSX.UTILITYHASHLOOKUP"
RowNumber = UtilityHashLookup("AccountTest",449100,0)
Ans=RowNumber
Account no 449100 is exit in AccountTest Hashfile but when i run this code i am getting null only.
AccountTest hashfile is having only one field called Account this is a key field of hashfile.
Can any help me ?
when i am calling UtilityHashLookup function in my routine , it alwas return space ... my code is
Deffun UtilityHashLookup(A1,A2,A3) Calling "DSX.UTILITYHASHLOOKUP"
RowNumber = UtilityHashLookup("AccountTest",449100,0)
Ans=RowNumber
Account no 449100 is exit in AccountTest Hashfile but when i run this code i am getting null only.
AccountTest hashfile is having only one field called Account this is a key field of hashfile.
Can any help me ?
rv
re
kduke wrote:Null means it does not exist. What do you want it to do?
You can copy this routine and make your own version and return @TRUE if found or @FALSE if not.
Hi ,
AccountTest hash table is having 449100 value., when i run the routine it is saying null....! i am not able to understand... how to pass arg in UtilityHashLookup , function.
see my hashfile is having only one column Account this key field for AccountTest hashfile, i am search 449100 value is exits in hashfile or not.
now tell me where i am doing mistake
rv
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
When you are performing a lookup in DataStage, whether from this routine or from a Transformer stage, failing to find the key value will result in each column on the reference input link being set to NULL. In this it behaves in exactly the same way as does a left outer join in SQL, it guarantees that the source row propagates, and NULL indicates that the sought key value was not found.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Its is not returning Null, it is just telling you the contents of the record keyed by 449100 and since you don't have anything in the record it is telling you nothing.
To understand it, use a Hased file which is having columns other than the key column and you will understand what is it doing? (It will show you the whole record).
Hope this will help you.
To understand it, use a Hased file which is having columns other than the key column and you will understand what is it doing? (It will show you the whole record).
Hope this will help you.
"
Now i am having two column in hashfile one is key column (account) another column is AccountName....!
now also it return record not found.
"loveojha2 wrote:Its is not returning Null, it is just telling you the contents of the record keyed by 449100 and since you don't have anything in the record it is telling you nothing.
To understand it, use a Hased file which is having columns other than the key column and you will understand what is it doing? (It will show you the whole record).
Hope this will help you.
Now i am having two column in hashfile one is key column (account) another column is AccountName....!
now also it return record not found.
rv
This means the record is not there, nothing else.Veni wrote:""loveojha2 wrote:Its is not returning Null, it is just telling you the contents of the record keyed by 449100 and since you don't have anything in the record it is telling you nothing.
To understand it, use a Hased file which is having columns other than the key column and you will understand what is it doing? (It will show you the whole record).
Hope this will help you.
Now i am having two column in hashfile one is key column (account) another column is AccountName....!
now also it return record not found.
(after running the routine double click the Results cell, you should see the record there)
loveojha2 wrote:This means the record is not there, nothing else.Veni wrote:""loveojha2 wrote:Its is not returning Null, it is just telling you the contents of the record keyed by 449100 and since you don't have anything in the record it is telling you nothing.
To understand it, use a Hased file which is having columns other than the key column and you will understand what is it doing? (It will show you the whole record).
Hope this will help you.
Now i am having two column in hashfile one is key column (account) another column is AccountName....!
now also it return record not found.
(after running the routine double click the Results cell, you should see the record there)
Thanks for all of you, i got the answer.. and my problem was solved
rv