error in job log

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

qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

error in job log

Post by qutesanju »

I ran one job which is updating records based on hash file lookup
but it get failed for some records saying.......

Unable to locate and update an entity, when an action of Update Only has been specified.

what must be reason?
I set UPDATE only action at target table to update only
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The database cannot update a record that does not exist.
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

Post by qutesanju »

So can i SET Insert NEW OR UPDATE EXISTING?
action at the target table?

The job is in production
ArndW wrote:The database cannot update a record that does not exist. ...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Sure, that would get rid of your error message, but you need to find out if that is a legal option in terms of your job design.
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

Post by qutesanju »

but since this is prod so i m not sure to set inser new or update existing at the target table
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to correct your job design. Something is wrong if your hashed lookup is supposed to get you updates and then they're not found in the target database. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

Post by qutesanju »

same job works fine in developement environment
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No it doesn't, you just think it does.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The job works the same, but I am sure your production data is different from your test data, thus the error.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

Post by qutesanju »

ok the job design is like this

input query-->transformer(lookup for hash file)-->target table update

i joined input key=hash file key in transfomer lookup
i checked this job but i didnt found any thing interesting .....
.what should be done for this?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I would guess that either your lookup constraint logic is faulty or the hashed file hasn't been populated correctly. Forced to guess due to an extreme lack of details.
-craig

"You can never have too many knives" -- Logan Nine Fingers
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

There must be some key by which you are updating the target table..
Check for few records which are failing to update
if the record exists and it fails to update , probably you dont have update permission..if the record doesn't exits then no problem..
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

Post by qutesanju »

I checked the log in director
suppose i have input query which contain 5 columns c1,c2,c3,c4,c5
in transformer i lookedup for c3.=c3.hash file
but in prev same job abort when i checked reason for this job abotrion it is showing /it looks that datastage is picking up c4 instead of c3 in lookup with hash file
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What makes you think it is 'picking up c4 instead of c3'? Are you using the exact same metadata in the lookup hashed file as the hashed file was created with?
-craig

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