Reading parameter file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Reading parameter file

Post by snt_ds »

Hi guru's,

Could you please suggest some methods to use parameter file in parallel jobs?In server jobs i was using DSSetParamFile before/after subroutine.Thanks.
smrutiranjannayak
Participant
Posts: 22
Joined: Mon Apr 02, 2007 4:02 am
Location: MUMBAI
Contact:

You can use this ..If i got ur qs right

Post by smrutiranjannayak »

Hi ,

If the qs is related to "how you can use parameters for file names or other things " then you can do this :

You can click on Job properties tab and on that you can declare a number of parameters as :
e.g,
parmSourceFilePath
and declare it as string and give some default value .

And in property tab of the stage use the format like
#parmSourceFilePath#

thi is the thing that you can do in server i hope same scenario will be there in PX . Just correct me if i am wrong.

Cheers :lol:
Smrutiranjan Nayak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:? I do not have DSSetParamFile available in my Repository. Can you please advise whether this is an user-defined subroutine? If it ships with DataStage, can you please advise in which category it is to be found?

Parallel jobs do support before/after subroutines.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

sorry ray.It is a user defined routine.Could you please suggest one method to read a parameter file in PX.thanks for your time.
kjosyula
Participant
Posts: 5
Joined: Mon Apr 09, 2007 5:22 pm

Post by kjosyula »

You cant use a parameter file for setting the job parameters. But you can implement the same using the environment variables. Define all the parameters you want to use for different jobs in the environment file and go to the jobparameters tab (Ctrl + J) add the environment variables that you want to use in this job as parameters with default value(Column Name in the job parameters tab) as $PROJDEF

Go to stage variables in your transformer define stagevariables with Initialvalue as GetEnvironment("parameter name from env file with double couts ")

Now use this stage variable as the parameter in the transformer. This should give you the value u have set in the environment file

Let me know if this helps.

-- JK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check out PNav on Kim Duke's web site.
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 »

PNav is Parameter Navigator. It is cheap and will help you manage all parameters and their values.
Mamu Kim
Post Reply