Lock for Preventing other user from UPDATION

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
Rubu
Premium Member
Premium Member
Posts: 82
Joined: Sun Feb 27, 2005 9:09 pm
Location: Bangalore

Lock for Preventing other user from UPDATION

Post by Rubu »

Hi

I want to lock a row while reading until I update it in another stage of the same job. The requirement is like this.....

I have to read table ABC (col1, col2) where col1='xyz' and store col2 in a file.

Now, I want to update col2 of ABC table with a value col2+input1(a number). but my concern is meanwhile no other user should update col2 value .

Is there any way of achieving it in datastage.?
Shall I place a lock while reading and release it in update stage in database stage(informix)?

If yes...how can it be done?


Regards
Rubu
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Yes, the only way to enshure no changes while you update would be to lock the record/s at hand, just check with your DBA if this might be achieved via you Isolation level (I think it can), if not you'll need to issue a lock statement.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

By the way,
how about:

Code: Select all

DB -> Xfm -> File
          -> DB
read the value in the Xfm write the original value to the file in one link and ion another link calculate and update the value.

IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply