Job Parametr and Hash Fiel name

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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Job Parametr and Hash Fiel name

Post 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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

It doesnt work I get error :

DSD.UVOpen Unable to open file Hash#NUMBER#.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is "NUMBER" your parameter - remember that parameters are case sensitive.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

Yes . Its the exactly name of my parametr
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You have not defined that parameter in your job.
changming
Participant
Posts: 68
Joined: Wed Oct 13, 2004 3:35 am

greate hash file before look up

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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