How to clean a hash partitioned?

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
marcelo_almeida
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 28, 2006 9:54 am
Location: Brasília - Brazil

How to clean a hash partitioned?

Post by marcelo_almeida »

Hi,

I created a hash partitioned and I made an initial load. I need to clean this hash, but I don't get.

Procedures already accomplished:

CLEAR.FILE HashName (account)

DELETE.FILE HashName (account)

CLEAR.FILE Hash (parts) (the command worked but it didn't clean, I continue viewing the data in Hash (account)

Nothing of that gave right!


Thank you in advance!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What do you mean by a "hash partitioned"?

The commands you give relate to hashed files. These are not partitioned.

What are you trying to achieve?
What, precisely, did you create, and by what means? Be precise and explicit in your description.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
marcelo_almeida
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 28, 2006 9:54 am
Location: Brasília - Brazil

Post by marcelo_almeida »

1 - I CREATED 10 EMPTY HASHED_FILE WITH SAME TABLE DEFINITION

2 - I CREATED POINTERS FOR EACH ONE OF HASHED_FILE OF THE PREVIOUS ITEM
EXAMPLE: SETFILE C:\TMP\HASH_01

3 - I CREATED ANOTHER HASHED_FILE WITH THE COMMAND BELOW, THIS COMMAND RELATES THE FIRST 10 THE THIS.

DEFINE.DF HSH_PESS ADDING HSH_NJ_PESS_01_0 1 HSH_NJ_PESS_01_1 2 HSH_NJ_PESS_01_2 3 HSH_NJ_PESS_01_3 4 HSH_NJ_PESS_01_4 5 HSH_NJ_PESS_01_5 6 HSH_NJ_PESS_01_6 7 HSH_NJ_PESS_01_7 8 HSH_NJ_PESS_01_8 9 HSH_NJ_PESS_01_9 10 INTERNAL " IF @ID[LEN(@ID),1] = 0 THEN 1 ELSE IF @ID[LEN(@ID),1] = 1 THEN 2 ELSE IF @ID[LEN(@ID),1] = 2 THEN 3 ELSE IF @ID[LEN(@ID),1] = 3 THEN 4 ELSE IF @ID[LEN(@ID),1] = 4 THEN 5 ELSE IF @ID[LEN(@ID),1] = 5 THEN 6 ELSE IF @ID[LEN(@ID),1] = 6 THEN 7 ELSE IF @ID[LEN(@ID),1] = 7 THEN 8 ELSE IF @ID[LEN(@ID),1] = 8 THEN 9 ELSE IF @ID[LEN(@ID),1] = 9 THEN 10 ELSE 10 "

4 - IN JOB I PLACED AN STAGE HASHED_FILE WITH HASHED_FILE HSH_PESS, BUT THE DATA ARE RECORDED INDEED IN THE OTHER ONES 10
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Aha! A Distributed file.

You must first remove all the part files from the Distributed file before you can delete the individual part files (hashed files).

Code: Select all

DEFINE.DF HSH_PESS REMOVING HSH_NJ_PESS_01_0 HSH_NJ_PESS_01_1 HSH_NJ_PESS_01_2 HSH_NJ_PESS_01_3 HSH_NJ_PESS_01_4 HSH_NJ_PESS_01_5 HSH_NJ_PESS_01_6 HSH_NJ_PESS_01_7 HSH_NJ_PESS_01_8 HSH_NJ_PESS_01_9
Removing the final part file will automatically remove the VOC entry for the Distributed file itself (HSH_PESS).
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 »

I was always curious as to where documentation on distributed files is kept? Remember having seen a mention of it in the Hash Stage disk caching guide.
Is a distributed(hash) file also known as type 27?


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

Post by ray.wurlod »

That's correct, Distributed files are also known as Type 27 (which is even more mysterious). There's no really useful documentation about Distributed files in the DataStage documentation; however the UniVerse User's Guide provides comprehensive coverage.
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

Post by chulett »

There was a presentation at AscentialWorld 2004 that went into how one particular company (BCBS?) leveraged distributed hashed files. It was very interesting, pros and cons, routines, the whole nine yards from what I recall.

I'll have to see if I can dig it up.
-craig

"You can never have too many knives" -- Logan Nine Fingers
marcelo_almeida
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 28, 2006 9:54 am
Location: Brasília - Brazil

Post by marcelo_almeida »

I executed the command:

DEFINE.DF HSH_PESS REMOVING HSH_NJ_PESS_01_0 HSH_NJ_PESS_01_1 HSH_NJ_PESS_01_2 HSH_NJ_PESS_01_3 HSH_NJ_PESS_01_4 HSH_NJ_PESS_01_5 HSH_NJ_PESS_01_6 HSH_NJ_PESS_01_7 HSH_NJ_PESS_01_8 HSH_NJ_PESS_01_9

But it returned the following error:

"Invalid token "HSH_NJ_PESS_01_0" on the command line"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The individual part files are Type 30. The Distributed file itself, although it is only a logical entity, is Type 27.
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