Job parameters

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
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

Job parameters

Post by 4friends »

Hi All,

How to pass the values for job parameters from a table at run time??

If any one replied it will be very helpful for me........

Bye
thanks & regards
kk
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Several ways... most would involve 'landing' the data in some fashion and then using a form of job control to pick the values up and pass them to the jobs that required them.

Simplest would probably be putting the value in a flat file and then using 'cat' to capture the content. This can either be done in a Sequence job using the Execute Command stage or even a custom routine via the Routine Activity stage. Then the value picked up can be used by any downstream process.

If you can use it in a stage variable rather than a job parameter, then the same technique can be applied in the 'Initial Value' of said stage variable. That way it only gets 'looked up' once and by simply leaving the derivation blank in the job, it becomes a constant you can use anywhere a stage variable can be used in a Transformer.

There is also the concept of USERSTATUS, you'll find a simple routine you can use here to set the value in one job and then another job can either retrieve it into a stage variable as above or pick it up in a Sequence job and again make it available as a parameter to any downstream process.

None of this is particularly difficult. It gets a little more so if you want to write your own job control code, but then the sky is the limit. You'd need to get familiar with the various 'DSSet' functions, particularly 'DSSetParam'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

Post by 4friends »

Sorry chulett.........

I am not able to see ur message............

Can anybody suggestme

byeeeeeeeee
thanks & regards
kk
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

Post by 4friends »

Sorry chulett.........

I am not able to see ur message............

Can anybody suggestme

byeeeeeeeee
thanks & regards
kk
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First suggestion would be to get a Premium membership, either yourself or via your company. You've been here for awhile, so you've seen the value of the information here. A little something I stole from Ray:

For less than 30c per day you can purchase premium membership which, among other things, allows you to read the entirety of posts by the five premium posters. Premium membership is 100% allocated to the hosting and bandwidth costs incurred by DSXchange; the premium posters are, like all other posters, unpaid.

However, anyone out there can 'suggestme'. You could also put some effort into the answer and try searching the forums as there is already a ton of advice out there. Suggest you might try searching for 'cat' or USERSTATUS or DSSetParam to get you started. You'll find posts like this one:

viewtopic.php?t=106875
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Less than Rs12 per day, definitely a worthwhile investment in your future.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Take a look at my Jobs and routines to integrate a parameter table into a sequence. You will find it on the DataStage Tools page of www.anotheritco.com .
Post Reply