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
Job parameters
Moderators: chulett, rschirm, roy
Job parameters
thanks & regards
kk
kk
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'.
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
"You can never have too many knives" -- Logan Nine Fingers
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
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
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
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 .
Chuck Smith
www.anotheritco.com
www.anotheritco.com