Create ,delete update Insert recors into hashed files

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
kkreddy
Participant
Posts: 28
Joined: Tue May 10, 2005 6:00 am

Create ,delete update Insert recors into hashed files

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply