Page 1 of 1

writing record in a Hash File

Posted: Thu Feb 13, 2003 6:23 am
by luca
Hi !
When a job writes record in a Hash File Stage.
What appends when a record has the same key than a record already stored in the hash file :
- is the old record replaced by the new one ?
- or is the first record which was already in the hash fiel kept and the new one ignored ?
Thanks for your reply.

Posted: Thu Feb 13, 2003 6:48 am
by chulett
Last one in wins. [:)]

-craig

Posted: Thu Feb 13, 2003 1:58 pm
by ray.wurlod
Depends how you access it.

If you write via a hashed file stage, the entire record is replaced.
If you write via a UV stage, you can choose the update strategy (the usual techniques; insert, update, insert before update, update before insert, and so on).
If you use the DataStage BASIC Write statement the record is over-written, but you may in your routine have pre-read the record and only modified certain fields.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518

Posted: Thu Feb 13, 2003 4:06 pm
by chulett
Good to know, thanks for the clarification!

-craig