Page 1 of 1

Create ,delete update Insert recors into hashed files

Posted: Thu Aug 17, 2006 8:28 pm
by kkreddy
Hi ,
Can any one help me how to create,insert update and delete records into a hashed file ,without using hashed file stage ,i mean by using Datastage Routines or unix script , if u have any example script or the place where can i find information Plz let me know .

Regards
KK

Posted: Thu Aug 17, 2006 8:46 pm
by chulett
Ok... first question would have to be... why? :?

That being asked, there are routines in the sdk you can check out for examples - like the Key Management routines. You can also examine any job's log that creates hashed files, the syntax used to create them will be in the log.

Keep in mind the fact that 'delete' is not a normal hashed file operation, nor is update per se. All you really do is 'insert' into it and it either adds a new record or it completely replaces an existing record with the same key(s). This is known as 'destructive overwrite'.

You can use a UV stage to access a hashed file and perform SQL operations against it. That would allow your delete and update actions. However, the hashed file needs to either exist in an Account (aka Project) or if pathed needs to have a VOC record established for it. Search the forum for SETFILE to find the syntax if you need it.

Posted: Thu Aug 17, 2006 10:11 pm
by DSguru2B
Even i am interested to know why exactly you want to do that via routine or unix?
Is this really your requirement or just for knowledge sake?