Page 1 of 1

Job Parametr and Hash Fiel name

Posted: Mon Jul 25, 2005 11:03 am
by snassimr
I do lookup from Hash file . I want to run job some times with different hash files therefore I defined Job parametr for it.
How to incoporate the Job parametr into hash file name in hash file stage ?

Filename :File1 where 1 is Job parametr

Posted: Mon Jul 25, 2005 11:18 am
by I_Server_Whale
Hi,
You can do it this way.

Mention the filename in the hash file stage as:

File#job_parameter_name#

For ex: File#1#

and also don't forget to add this parameter in the job properties dialog box. Once you do this, you should be able to use the defined job parameter.

Naveen.

Posted: Mon Jul 25, 2005 9:38 pm
by ray.wurlod
Your approach only works if the hashed files have identical metadata in terms of how data are stored in them.

DataStage is absolutely metadata driven. If you need different metadata (table definition) then you need a new job design.

Posted: Tue Jul 26, 2005 1:15 am
by snassimr
It doesnt work I get error :

DSD.UVOpen Unable to open file Hash#NUMBER#.

Posted: Tue Jul 26, 2005 1:17 am
by ArndW
Is "NUMBER" your parameter - remember that parameters are case sensitive.

Posted: Tue Jul 26, 2005 1:27 am
by snassimr
Yes . Its the exactly name of my parametr

Posted: Tue Jul 26, 2005 1:50 am
by ArndW
snassimr,

in the Designer, if you do a "View Data" on the hash file do you get prompted to fill in the value of the parameter?

Posted: Tue Jul 26, 2005 2:25 am
by Sainath.Srinivasan
You have not defined that parameter in your job.

greate hash file before look up

Posted: Tue Jul 26, 2005 3:10 am
by changming
Sainath.Srinivasan wrote:You have not defined that parameter in your job.
one possbile reason is that you look up hash file before the file is crreated.

Posted: Tue Jul 26, 2005 9:38 pm
by ray.wurlod
DSD.UVOpen Unable to open file Hash#NUMBER#.

The fact that a job parameter reference appears in the error message means that the job parameter has not been resolved.

Try a View Data on the Hashed File stage output link. Does this parameter get prompted for? If not, it means either that the job parameter is not defined in this job at all, or that it is not spelled or cased the same way in the job parameter definitions and in the Hashed File stage output link's File Name field.

Without wishing to be rude, your assertion that "Yes . Its the exactly name of my parametr" seems not to be the case; your typing skills as seen in this thread add to our suspicions that my diagnosis will be close.