LookUp fails

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
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

LookUp fails

Post by naren6876 »

Hi,
In my seqfile One field value is '000'and in my lookuphash file field value is '0'. SO when it is trying to lookup. it will fail.

How to solve this problem.
any help would be appreciated.

TIA
gpatton
Premium Member
Premium Member
Posts: 47
Joined: Mon Jan 05, 2004 8:21 am

Post by gpatton »

to field in seq file use

(linkname.seq_field_name + 1 - 1)

this will convert it to 0 which will then match with the lookup
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

gpatton wrote:to field in seq file use

(linkname.seq_field_name + 1 - 1)

this will convert it to 0 which will then match with the lookup
I think you mean in the key expression where you do the lookup use:

Code: Select all

linkname.seq_field_name + 0
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

Thank you
gpatton wrote:to field in seq file use

(linkname.seq_field_name + 1 - 1)

this will convert it to 0 which will then match with the lookup
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: Note the change Ken made to the key expression logic. Any kind of 'math' on the field will (in essence) convert it to a number. So do something that you know won't change the value of the field - like adding zero to it - rather than adding and subtracting 1 from the value.

Both work and illustrate the point, the zero is 'safer' and fewer operations. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply