Page 1 of 1

Type 19 Hashed File

Posted: Thu Mar 06, 2008 12:41 am
by hamzaqk
Hi All,


Just playing around with the Type 19 hashed file. i have a source file with 4 rows and a two columns with values .
  • 11,a
    11,b
    12,a
    12,b
I want these to go in separate files based on the grouping column, say the first one in this case. so two files should be created named 11 and 12 containing data pertaining to them based on the scenario. I create a type 19 file by issuing the following command in the admin

Code: Select all

CREATE.FILE FILE_TEST 19
The output says creating FILE_TEST as type 19 and D_FILE_TEST as type 3. which is ok ?
Help on a few questions pertaining to this please now.Correct me if i am wrong somewhere.
  • 1. How can i specify where the Hashed file can be created i.e the path.
    2. If i run the job would seprate hashed file will be created for each group or different files will be created in the FILE_TEST directory?
    3. How would i read these files once created ?
Many thanks on this.

Posted: Thu Mar 06, 2008 1:42 am
by aakashahuja
Firstly, Type 1 and Type 19 and hashed files which DS uses to store its structures and I am really not sure if they can be used for user purposes (i.e., they can be accessed using the DS pallette). However you can create them using the universe shell as you have done.

Never tried working with them, however, being DS specific files, I am not sure if you would be able to create them under any path other than the project directory. While for other hashed file types, you need to first create a pointer to the pathed hashed file (using setfile if I remember correctly) before you do anything to them.

Hope it helps.

Cheers
Aakash

Posted: Thu Mar 06, 2008 2:17 am
by ray.wurlod
1. By using a mkdbfile command rather than a CREATE.FILE command.

2. Different files will be created in the FILE_TEST directory.

3. With any text viewer you like.

Tip
To execute a DOS command from the Administrator client, use the DOS command with a /C switch. For example:

Code: Select all

DOS /C "mkdbfile F:\MyFolder\FILE_TEST 19"

Posted: Thu Mar 06, 2008 4:21 am
by hamzaqk
My understanding, after fishing through the forum here also, is that mkdbfile is for unix ?

P.S i have tried the command

Code: Select all

 DOS /C "mkdbfile F:\MyFolder\FILE_TEST 19"
It states the mkdbfile is not a recognised internal or external command. Might be because of the about reason then ? If i follow the same procedure by doing Create.File it does not create separate files for each group mentioned. :roll:

Posted: Thu Mar 06, 2008 4:35 am
by ray.wurlod
mkdbfile is for either operating system. It resides in the DataStage Engine bin folder.