Page 1 of 1

Sequence x Job with ParameterSet

Posted: Fri Jun 09, 2017 8:03 am
by joycerecacho
Hi everybody!

I'd like to run the same job 12 times (changing only a date parameter) using Sequence job.
I noticed that when I open the job object in the Sequence, it appears only the parameter set and I can't set one of its parameters - which will receive the date value.

Is there any way of doing it?
Don't tell me that it is only possible to run it 12 times through .bat...

Thank you in advance!!
Joy

Posted: Fri Jun 09, 2017 9:12 am
by chulett
Sounds like a looping Sequence to me... have you ever done one before with the Start Loop and End Loop stages? I don't know why you wouldn't be able to set that parameter per iteration...

Posted: Fri Jun 09, 2017 10:31 am
by joycerecacho
Yes, I've already done this kind of Looping Sequence.
The thing is: is it impossible to set manually a parameter of a 'parameter set' to run it throught the Sequence?

Posted: Fri Jun 09, 2017 12:13 pm
by chulett
I can't imagine it's impossible... is your parameter set using value files? Seems to me that would drive the approach.

I'll probably have to leave the actual advice up to others as I don't have DataStage access and haven't for several years now.

Posted: Fri Jun 09, 2017 1:44 pm
by Mike
Unfortunately the job activity is lacking in flexibility when it comes to parameter sets. You are essentially stuck with 3 options: choose "As Predefined", choose a values file name from the drop-down list, set it to the controller's parameter set of the same name.

The command line gives you much more flexibility. When I need the flexibility, I run the dsjob command in an execute command activity within the job sequence.

For example, when I want to dynamically select a values file at run time or I want to loop through and run a job for all values files in a parameter set.

In your case, setting 1 parameter within a parameter set is another example of added flexibility that you get from the command line.

Mike

Posted: Mon Jun 12, 2017 12:51 pm
by FranklinE
Consider creating an alternate parameter set for this job, and "demote" the date parameter to the job level. I don't use parameter sets for that exact reason, I sometimes need to override a value and making it "local" to the job (or sequence) makes setting its value easy.

I forget where I saw it: convenience is the best teacher of the meaning of diminishing returns. :lol:

Posted: Tue Jun 13, 2017 3:48 am
by Timato
You may be able to go around this by using the DSRunJob routine, though I have not personally tried id.... I think you can pass in the individual parameter values belonging to a parameter set by using [parameter_set_name].[parameter1]=[value1]|[parameter_set_name].[parameter2]=[value2]|[rest of parameters].

Having said that, i'd much prefer FranklinE's demoting, less messy :)

Posted: Tue Jun 13, 2017 7:01 am
by ray.wurlod
Values files are definitely the way to go.