Create HASH file in specific folder using CREATE.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
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

Create HASH file in specific folder using CREATE.FILE

Post by denzilsyb »

Hi Guys

I need to create a 64bit HASH file outside of the project directory. I have tried:

CREATE.FILE '\tmp\MYHASH\FILENAME' 1 2000 64Bit

for example but the file is still created with the name %tmp%MYHASH%FILENAME in the project directory. Am I right in saying I cant create a HASH file from Administrator in a specific location?

Is there a way I could create the file and then edit the attributes in UV by hacking a table or two? Or is there an easier way?

thanks!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The way to do this is to use the UNIX command that actually creates the file:

mkdbfile {filepath & name} 2 1 4 64BIT

this creates a type 2 file with a modulo of 1, separation of 4 and 64BIT pointers.

You can use the hashed file stage and file creation command in a job, run it and see the actual mkdbfile command in the job's log to get an idea of how it works.
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

Post by denzilsyb »

Thanks Arnd, works like a charm.

I have now placed the command in as a before job subroutine, i would have thought the $DSHOME/$PATH variables would come into play because the director complains about the command not found unless i physically put the full path and filename to specify where mkdbfile is.

many thanks again!

dnzl
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I just realized that you need to specify "-64BIT" on the command line; using jsut "64BIT" will not result in a 64bit file (but it won't give you an error message, either). Sorry about that.
Post Reply