Parameters in Datastage Sequences

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
mawwoods
Premium Member
Premium Member
Posts: 30
Joined: Mon Oct 13, 2003 2:44 am
Location: UK

Parameters in Datastage Sequences

Post by mawwoods »

I'm having a few problems with DataStage parameters and am wondering if anyone can help.

I'm now used to setting job parameters from a sequential file using a pre job routine. In this way we can set parameters from an external source without having to manually type anything in....great for batch jobs.

What we would like to do, but are unable at present, is to set parameters at the controlling sequence level. This would mean that we could set the parameters once, and then run multiple jobs within a sequence that would then all use the parameters set at the higher level. This would then avoid having to set the parameters once for each individual job.

Can anyone help with this? Would be much appreciated. :)
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Well if you want to use sequence GUI jobs you simply need to put all the relevant parameters in the sequnce job itself and pass the relevant parameters to each job/routine activity you have in the sequence; wrap it in some DS basic controll job that gets the parameters list of your sequence job and assigns the values from the data you retrieved from your parametes file.

If you ment DS basic sequence to automatically assign values, the logic is similar, execpt you'll need some GoSubs to perform parameters assignment for each one, actually I think this is one of the course exersises when learning DS if my memory serves me.
if your not familiar with how to get the parameters list take a look in the DS Help for the DSGetJobInfo routine and such.

bare in mind as Ray often reminds us all that checking for a successfull DSSetParam call to ensure it was ok foreach parameter you set in each job.

IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

roy wrote:checking for a successful DSSetParam call to ensure it was ok for each parameter you set in each job.
No less important, if you "roll your own", is checking that DSGetParamInfo calls were successful.
:idea: Build in insurance against future developers, who obviously know/care less than you (always a safe assumption), changing the parameter names in jobs from which your code obtains them.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mawwoods
Premium Member
Premium Member
Posts: 30
Joined: Mon Oct 13, 2003 2:44 am
Location: UK

Post by mawwoods »

Got a solution for us in the end, but not by the same meathod. Instead we just ran a routine in the sequence. We then opened the job properties of the jobs where we wanted to use the parameter, and then clicked on the 'insert parameter value' on the 'job' tab. Scrolling down, we saw that you can link the parameter for the job to the output of the routine. Good enough for us for this instance.....
Vishvas
Participant
Posts: 34
Joined: Sat Jun 21, 2003 3:52 am

Post by Vishvas »

But please make sure that you are not using sequence stage. This stage will not probagate the return values of the routine activity.

Go through the post

viewtopic.php?p=101868#101868

Arun
mawwoods
Premium Member
Premium Member
Posts: 30
Joined: Mon Oct 13, 2003 2:44 am
Location: UK

Post by mawwoods »

Vishvas wrote:But please make sure that you are not using sequence stage. This stage will not probagate the return values of the routine activity.

Go through the post

viewtopic.php?p=101868#101868

Arun
Thats probably saved us some problems. Thanks!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Keep in mind that fact that the problem mentioned in the other post is specific to the 7.x version and that propagation of Routine return values beyond Sequence stages works just fine in 6.x.

Now the question is... will this still be the case when you decide it's time to upgrade? :?
-craig

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