Enable Selection tab in Hash Stage for Remote 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
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Enable Selection tab in Hash Stage for Remote Hash File

Post by willpeng »

All:

I researched a lot of people's post about mkdbfile, setfile, and hash file, but I got bits and piece of info. So I am posting to see if anyone can help me understand this a bit more so I can enable the selection tab in the hash stage for Remote Hash File without too much manual process.

The background of what i am doing is this:

I am upgrading an older DS6 system to DS7 system. New guideline requires all hash files be pathed and remote.

I was able to convert all the account setting to directory setting editing the dsx file.

I create the remote hash file using mkdbfile and use setfile to put it. Everythng works well except those hash files that has a selection setup.

My understanding is that the selection is a pick feature and require a dictionary to be created. I did see D_Hashname files created by DS, but for some reason it is not using it.

What am I missing here? do I need a setfile on the D_Hashname too? I really do not wish to manually create Dict files for each hash files. There are over 200 jobs that uses selection and who knows how many hash files within a job has. And I need to do it again when this goes to production.

Any suggestion?
William Peng
DW/ETL Consultant
Middletown, NJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, mkdbfile does create the dictionary component, and SETFILE includes a pointer to it. You can prove this with a command such as

Code: Select all

LIST.DICT hashedfilename
The thing that doesn't happen when you use mkdbfile is the creation of column definitions within the file dictionary (after all, it's got nowhere to get them from). If you create the hashed file from DataStage, it has the table definition and can build the dictionary from that. But if you use mkdbfile manually, you also have to build the file dictionary manually. Search the forum for INSERT INTO DICT
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Post by willpeng »

After searching the forum, I found out that you can create the file dictionary content without coding by validating the job. So that is what I did, but I still can't get the selection tab in the hast file stage to be active.

Also, how I verify if the dict content is created by validating?

Any idea?
William Peng
DW/ETL Consultant
Middletown, NJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Selection tab is never enabled if you are using the hashed file on a reference input link. Being local or remote is irrelevant. There is no reason that the Selection tab would be disabled on a stream input just because the hashed file is not in an account.

At my current site we have the same rules about pathed hashed files, but the Selection tab is enabled on stream input links (7.1r1 on AIX).

Are you using the hashed file on a stream input link (solid line into Transformer) or on a reference input link (dashed line into Transformer)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Re: Enable Selection tab in Hash Stage for Remote Hash File

Post by kcbland »

willpeng wrote:I was able to convert all the account setting to directory setting editing the dsx file.
This is your mistake. You need to use the project setting, as it will then pick up the VOC entry created by SETFILE to file the path to the hash file.

The SELECT tab is only activated for jobs with the project setting selected. Your hash file isn't in the project, so don't be worried.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I neglected to mention my personal standard #47; any job that creates a hashed file executes a SETFILE command to create the VOC pointer. And therefore can use the Account option and have the Selection tab enabled.
Sorry about that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You cannot post #47 without postig the other 46 standards. :wink:
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If I posted all of those then anyone could command the same level of fees that I do. :P

And I worked hard to assemble these! :!:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

William,

Look at my CreateVocPtr() routine on the DataStage Tools page of www.anotheritco.com .

In the Step02CreateInverseHashPart1 job, call the CreateVocPtr() routine as a Before-job subroutine. Do this on you Job Properties tab.

After the VOC pointer is created in Step02, the Step05 jobs will give you the selection tab if the Use Account Name button is pushed. All other steps may use Use Account Name or use directory path.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If I posted all of those then anyone could command the same level of fees that I do.
I seriously doubt that. We would just know 47 things Ray knows. How many posts do you have now and how many do you have left in you?

You do not need to post them. You have given us enough for one lifetime but please do not stop.
Mamu Kim
willpeng
Participant
Posts: 18
Joined: Wed Apr 07, 2004 9:24 pm
Location: Middletown, NJ

Post by willpeng »

The Ascential guys told me to convert the remote directory location into an account. I'll see how that turn out.

Ray:
To answer you, it is streamed. Also, for some reason I am not seeing dictinoary D_hashname created on the remote directory when I use mkdbfile. I am using 7.1
William Peng
DW/ETL Consultant
Middletown, NJ
Post Reply