Page 1 of 1

DataStage Parameters

Posted: Wed Aug 04, 2010 8:33 pm
by Ultramundane
Please extend datastage parameters to allow them to be the result of some function. That is, allow for functions to be used as part of the parameters default value.

Posted: Wed Aug 04, 2010 9:16 pm
by kris007
This can currently be achieved in Job Sequences within the Job Activity Stage where you can use Functions.

Posted: Wed Aug 04, 2010 9:19 pm
by Ultramundane
Thanks for the feedback. Unfortunately, I am aware of that, but I'm looking for it to be simpler. ;)

I guess, I WISH that I could be able to do this in the main job.

Posted: Wed Aug 04, 2010 9:32 pm
by ray.wurlod
You can "sort of" achieve this with stage variables in a Transformer stage early in the job.

Posted: Thu Aug 05, 2010 4:52 am
by Sainath.Srinivasan
You can store your parameters into a dbms table and extract the relevant parameters prior to the run. Some of these may be functions which can be translated by your dbms into appropriate constants during this extraction phase.

This is a method I tried successfully some time ago as this gives ease of maintenance and acts as a central repository.

Also have tried storing as a separate param file from which your your jobs can read their params. This may also contain function which can be translated during read.

Posted: Thu Aug 05, 2010 5:40 am
by ray.wurlod
Sainath, I think Ryan is looking for something entirely containable within a job.

Posted: Thu Aug 05, 2010 11:36 pm
by Ultramundane
Yeah, I would like it be to contained within the job. I also like your suggestion. It is pretty brilliant and works for a lot of jobs, but not all. It is great for dyanmic Where clauses.

Thanks.

Posted: Sun Aug 08, 2010 9:28 pm
by ray.wurlod
Ah. I suspect IBM's response will be that you can use stage variables in a Transformer stage early in the job to effect what you describe as "computed parameters" - simply putting these values onto an output link makes them accessible downstream. A stage variable that has an initialization expression but no derivation expression does not generate any per-row processing overhead.

Posted: Sun Aug 08, 2010 9:57 pm
by Ultramundane
Correct, but I don't believe this gives me access to use this input data as properties within the stages themselves. For instance, for setting Dynamic instances names via a computed lookup, or doing a computed lookup to set or change the transaction size, or for doing computed filenames for both source and target sequential file stages or datasets. Maybe it does though and I am missing something. If it does, and I am missing something, I'd like to know what I am missing, however though, maybe it still makes sense for such a capability to exist as it might streamline this entire process. I guess I think the solution I am proposing is much more straightforward and user friendly. ???

Posted: Mon Aug 09, 2010 2:05 am
by ray.wurlod
OK, I now see the bigger picture. Still don't like your chances of getting this one through (it can be done in a sequence) but, if you don't ask you might die wondering!