specifying parameter SET via dsjob?

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
val
Participant
Posts: 21
Joined: Tue Jun 05, 2007 4:11 pm

specifying parameter SET via dsjob?

Post by val »

I'm trying to run DataStage jobs from the command-line using dsjob. Works fine, except for jobs that have parameter sets. Does anyone know if and how I can specify a particular parameter set in the dsjob arguments? Or must I specify each of the params in the set explicitly?

To illustrate: I have a job that takes a DSN, username and password. In the job design I created three params, and then created three parameter sets called "dev", "test" and "prod". In each set, the DSN name, username and password have different values. I also have an optional "email" parameter, not part of the sets -- the user can enter a value here to get notified on job completion.

When I run the job from Designer or Director, I'm prompted to select a parameter set, and a value for the email param, and all works fine. But when I run from dsjob, I can specify -param email=foo@bar.com, but I can't figure out how to tell dsjob to specify the dev or test or prod param set.

Do I need to explicitly set all the params in the parameter set from the command-line?

Thanks!

- Val
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unless they've specifically added that 'parameter set' option to the command line, you'll need to specify each individually. Check the documentation or type dsjob -run and check the usage statements.

I don't have 8 dot anything so can't check myself.
-craig

"You can never have too many knives" -- Logan Nine Fingers
val
Participant
Posts: 21
Joined: Tue Jun 05, 2007 4:11 pm

Post by val »

I think you're probably correct -- the dsjob docs don't say anything about a param set option, and trying to use the param set name as a param:

-param <paramsetname>=<value>, like
-param DSNParamSet=dev

doesn't work.

This would suck -- I don't want to specify e.g. production passwords on the commandline (I don't even want to KNOW the production passwords!), I want to invoke a stored setting. I've opened a ticket with IBM... I'll update y'all on what they say.

Any other way around this?

- Val
gomez
Premium Member
Premium Member
Posts: 83
Joined: Tue Jun 22, 2004 6:11 am

Post by gomez »

Well, we just got a reply from IBM, and it does indeed work -- just misspelled the param set name.

To be clear:

In order to specify a parameter set as an option to dsjob, use

Code: Select all

-param <parameter_set_name>=<value_file_name>
If you have a job "test_job" in a project "test_project" that takes a parameter set named "foo_params" with value files named "dev", "test" and "prod", the dsjob invocation looks like

Code: Select all

dsjob -run -param foo_params=dev test_project test_job
Enjoy!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Good to know! Time to mark this as Resolved it seems.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Abhijeet1980
Participant
Posts: 81
Joined: Tue Aug 15, 2006 8:31 am
Location: Zürich
Contact:

Post by Abhijeet1980 »

Hello Everybody,

What if the no of parameters are more ...Say about 20 - 25 odd.

Bcos of the limitation from the OS end (UNIX/Solaris in our case), there has to be some other alternative for the same. :(

I've been suggested by our colleagues that we do go for the Routine which would read a text file containing the parameters and using SETPARAM set all parameter values. :D

Any alternative answer would be really appreciated .....

Thanks
Abhijit
Kind regards
Abhijit Gaikwad
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

We do all this in a shell script. Works fine.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Abhijeet1980 wrote:What if the no of parameters are more ...Say about 20 - 25 odd.
And you can't let any of them default? :?

As Kim notes, you can script this. Or use something like Ken Bland's Job Control Utilities.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply