passing parameter values

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
djoni
Participant
Posts: 98
Joined: Wed Oct 05, 2005 1:01 pm

passing parameter values

Post by djoni »

How do we pass parameter values to a job at run time?
(not manually keying the values, no defaults)
tardifma
Premium Member
Premium Member
Posts: 23
Joined: Tue Jan 24, 2006 10:53 am

Post by tardifma »

Hi djoni.

Well, first, you need to define the parameter (name and type) in the job properties.

Second, you can pass the value of the parameter with the dsjob utility (at the prompt).

dsjob -run -param param_name=param_value -param param_name=param_value... -wait project_name sequencer

hope it helps
The Brute
djoni
Participant
Posts: 98
Joined: Wed Oct 05, 2005 1:01 pm

Post by djoni »

tardifma wrote:Hi djoni.


dsjob -run -param param_name=param_value -param param_name=param_value... -wait project_name sequencer

hope it helps
Thanks "The Brute". But, this mean we hardcode the paramater values in the dsjob, doesn't it?

djoni
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Post by kwwilliams »

How would you generate the parameters? Your issue seems unclear. If you could explain in more detail with something like, "I have a job that will get its paraameters from a previous job, how could I do this?" I don't think I can understand how to help you until you tell us how you would determine the parameters to pass to this job in the first place.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You can maintain a parameter file which hold all the necessary dynamic parameter. And it can be passed to -param in dsjobs. You can refresh the parameter file for every run as you wish.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
djoni
Participant
Posts: 98
Joined: Wed Oct 05, 2005 1:01 pm

Post by djoni »

kumar_s wrote:You can maintain a parameter file which hold all the necessary dynamic parameter. And it can be passed to -param in dsjobs. You can refresh the parameter file for every run as you wish.
This is great news!
But, what will be the content of the parameter file? parameter name and value pairs? Format?
And, how willl the dsjob command look for the file and the specific parameter? I can't see them in the dsjob command options
djoni
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

No, there isnt any inbuilt parameter file for dsjob. Instead you need to create of your own logic and need to prepare code(Shell script) to read the parameter file and pass the values to the dsjob commands.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
djoni
Participant
Posts: 98
Joined: Wed Oct 05, 2005 1:01 pm

Post by djoni »

kumar_s wrote:No, there isnt any inbuilt parameter file for dsjob. Instead you need to create of your own logic and need to prepare code(Shell script) to read the parameter file and pass the values to the dsjob commands.
I would really appreciate it if you could email me a sample script darmawd@thedominion.ca

Many thanks, djoni
Post Reply