Default Values in Parameter Set

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Default Values in Parameter Set

Post by iq_etl »

We've got 8 generic parameters in a parameter set and each DS job has its own, unique values it may or may not use, is it possible to set up a parameter in the Job Properties that can serve as a default value for one of the generic 8 parameters in the parameter set?

I'm wondering something like if in JOB_A I want to set a default value for the current year I can have a parameter named CCYY, prompt would be parameter_set.PARAM01, and default value would be 2013. So then PARAM01 in the parameter set will default to 2013 when it is being used by JOB_A.

Is there something like that I can do to provide default values for the generic parameters in a shared parameter set?

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

Post by ray.wurlod »

Use values files to provide different sets of defaults for different circumstances (in your case for different years).

If you make the parameters all environment variables you can create default values in the Administrator client.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

The value files look like a good approach.

As I add new value files, will I need to re-compile all of the jobs that use the parameter set whether they use the new value file or not?

Also, to get these values from the value files to show up, how are they assigned within a job? It looks like they're assigned in a Job Activity of a sequence. That, to me, appears that every job executed by the Job Activity will have the defaults of that value file.

Is there a way to assign value files at the job level?

Thanks!
Last edited by iq_etl on Fri Oct 25, 2013 9:09 am, edited 3 times in total.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I would recommend setting any environment variable in a parameter set to $PROJDEF as a default. That way if you change the environment variable at the project level the jobs will pick up the change without recompilation.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

Great suggestion, Andy, and we do this with server info parameters.

Here I'm looking more at a series of generic parameter defaults. So say, JOB_A will have PARAM01 as a year of 2013, but JOB_B may have PARAM01 as some code like D12.

Thanks!
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

We are using value files to create default values for testing.

Thanks, Ray!
Post Reply