how to empty a HASH file?

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
qutesanju
Participant
Posts: 373
Joined: Tue Aug 26, 2008 4:52 am

how to empty a HASH file?

Post by qutesanju »

hi
can anybody tell me how to empty a hash file?
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Re: how to empty a HASH file?

Post by veera24 »

qutesanju wrote:hi
can anybody tell me how to empty a hash file?
You can delete the file. It's better for us to explain if you post exactly wat you need.

Thanks,
Veera
Thanks in advance...
veera...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a job that sends 0 rows, but has "clear before write" set. Or has "delete before create" set. If there is a VOC entry for the hashed file you can also use the CLEAR.FILE command (which the first of the above choices does under the covers).
Last edited by ray.wurlod on Wed Dec 24, 2008 2:41 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sathishkumarins
Premium Member
Premium Member
Posts: 41
Joined: Tue Jul 08, 2008 5:45 am
Location: Columbus

Re: how to empty a HASH file?

Post by Sathishkumarins »

Simply you can add a transformer before hashed file and you can pass null values to the columns and as Ray mentioned you have check the option ''Delete file before create".
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have to? No, you can simply 'Clear' the hashed file as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: how to empty a HASH file?

Post by ray.wurlod »

Sathishkumarins wrote:Simply you can add a transformer before hashed file and you can pass null values to the columns ...
That is wrong. What you do is set up a constraint expression (such as @FALSE) that allows no rows at all to pass. If you send NULL to a key column you end up with a warning in the job log. You ought never to generate warnings from server jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: how to empty a HASH file?

Post by chulett »

ray.wurlod wrote:
Sathishkumarins wrote:Simply you can add a transformer before hashed file and you can pass null values to the columns ...
That is wrong. What you do is set up a constraint expression (such as @FALSE) that allows no rows at all to pass. If you send NULL to a key column you end up with a warning in the job log. You ought never to generate warnings from server jobs.
And, for the trifecta, you also need to add a stage variable to the transformer so the job will compile. And while you cannot 'pass null values' you can set their derivation to @NULL with the @FALSE constraint that Ray mentioned.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Correct terminology is HASHED file, not "hash" file.

To empty a hash file I imagine you would use a wire brush of some kind.

A hash file is a tool for shaping a block of hash.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

hash can also be smoked ..lol..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I wonder how you know that? Ah yes, California...

:lol:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ragavendradinesh
Participant
Posts: 3
Joined: Sat Oct 20, 2007 12:51 pm
Location: Chennai

Post by ragavendradinesh »

Hi,

You can clear a hashed file using the following command in the Execute option in Administrator.

clear.file hash_file_name
Thanks & Regards,
Dinesh
SoaresRui12
Premium Member
Premium Member
Posts: 20
Joined: Tue Dec 16, 2008 10:09 am
Location: Lisboa

Post by SoaresRui12 »

You can do the command uv, clear.<hashed file> in the "after job" option and clear the hashed file that have used in this job.
If it's that you are ashed.
with best regards

Rui Miguel Soares
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's already been noted along with the fact that that requires a VOC entry, i.e. an account-based hashed file or a pathed hashed file with a manually created VOC record.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply