How to clear the Hash Entries in the VOC 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
Rajender
Participant
Posts: 24
Joined: Wed Mar 31, 2004 6:10 am

How to clear the Hash Entries in the VOC file

Post by Rajender »

Hi Gurus,

I have created an HASH file by name HASH_COUNTRY_REGN_TYPES , I have used account name while creating it. Then I have deleted that hash file in the project directory where it was created.

So now when I re-run it I get the error as below

LoadCountryRegistrationTypesHash..MapRegType: |LoadCountryRegistrationTypesHash..HASH_COUNTRY_REGN_TYPES.lnk_regTypes: DSD.UVOpen "HASH_COUNTRY_REGN_TYPES" is already in your VOC file as a file definition record.
File name =
File not created.
.|

I can clearly understand by the error message that the VOC entries of the hash file still exist, hence cant create it..

Kindly plz advice me how to delete the complete entries in the VOC so that I can re create the hash file

Many Thanks
Raj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Put some other hashed file there using that name and then delete it the right way. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
tagnihotri
Participant
Posts: 83
Joined: Sat Oct 28, 2006 6:25 am

Re: How to clear the Hash Entries in the VOC file

Post by tagnihotri »

Thats why I love VOC if u mess with them they will mess with your jobs :twisted:

So manage your VOC's well and be cautious before firring 'rm' !
Rajender wrote:Hi Gurus,

I have created an HASH file by name HASH_COUNTRY_REGN_TYPES , I have used account name while creating it. Then I have deleted that hash file in the project directory where it was created.

So now when I re-run it I get the error as below

LoadCountryRegistrationTypesHash..MapRegType: |LoadCountryRegistrationTypesHash..HASH_COUNTRY_REGN_TYPES.lnk_regTypes: DSD.UVOpen "HASH_COUNTRY_REGN_TYPES" is already in your VOC file as a file definition record.
File name =
File not created.
.|

I can clearly understand by the error message that the VOC entries of the hash file still exist, hence cant create it..

Kindly plz advice me how to delete the complete entries in the VOC so that I can re create the hash file

Many Thanks
Raj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Copy a different hashed file in using the name of the one you dropped - in other words, give it something to delete in addition to the VOC record.

Then use the proper command. Check your job's log that created it in the first place and use whichever command is appropriate for the method used to create it:

CREATE.FILE -> DELETE.FILE
CREATE TABLE -> DROP TABLE
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rajender
Participant
Posts: 24
Joined: Wed Mar 31, 2004 6:10 am

Post by Rajender »

Hi Chulett,

First of all thanks for this quick response very much appreciated.

when I try to excute the fallowing universe command

DELETE.FILE HASH_COUNTRY_REGN_TYPES

Unabel to open"HASH_COUNTRY_REGN_TYPES" file


CREATE.FILE HASH_COUNTRY_REGN_TYPES

"HASH_COUNTRY_REGN_TYPES" is already in your VOC file as a file definition record.
File name =
File not created.

I belive the Delete command will not clear the VOC entries, any suggestions please?

Thanks
Raj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

[sigh] Of course it will. Follow all of my instructions, not just parts. Both commands are confused by your tactical air-strike at the operating system level. You need to put something back to replace what you nuked so that it has all the bits it needs to delete all of it properly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is this a dynamic hashed file? Did you copy all of the parts that make it up - the directory, the three files in the directory and the D_ file that lives at the same level as the directory?
-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 »

If you create the hashed file in the account, the correct way to remove it is to use the DELETE.FILE command.

Given that you have removed the operating system object, you now have two other tasks to perform to clean up; remove the operating system object for the dictionary portion and remove the VOC entry.

Craig's method, of creating the operating system object that you deleted, then using DELETE.FILE, will accomplish all of these.

Otherwise you need to delete D_HASH_COUNTRY_REGN_TYPES at the operating system level then enter the DataStage environment to remove the VOC entry, for example

Code: Select all

DELETE FROM VOC WHERE @ID = 'HASH_COUNTRY_REGN_TYPES';
Be very, very, very careful using DELETE commands in VOC; get it wrong and your project is gone. Prefer Craig's technique.
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