Can i write to a hashed file from multiple links

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
dhiraj
Participant
Posts: 68
Joined: Sat Dec 06, 2003 7:03 am

Can i write to a hashed file from multiple links

Post by dhiraj »

Hi,

Can i write to same hashed file from more then one stage in a job.I want to recreate the file for each run.

I tried doing this and this worked.

But i wanted to know if it is safe doing this.

thanks
dhiraj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ALL writes to a hashed file are destructive overwrites, whether from one source or many. If the key being written already exists on the hashed file, then that row is replaced entirely with the columns of the new row.

If this is what you want to happen then, yes, it is "safe".

A hashed file behaves like a table, but only with record-level locking (table-level locking is available, but not through the Hashed File stage).

Indeed, if you desire some other behaviour, you may prefer to access the hashed file using a UV stage, where all of the characteristics of SQL (DML) are at your disposal.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply