Hello To All:
Is there a way to run a Unix shell script from within a DataStage job, get the value returned by it, and assign it to a job-parameter to be used in existing job(s)
Thanks
dtatem
Parameter From Unix Script
Moderators: chulett, rschirm, roy
Re: Parameter From Unix Script
You can't set the parameter of a job from within the same job. It will have to be done externally, say via the job sequence. You could write a routine with a DSExecute to fire the shell script and capture the return value. This routine may be triggered via a Routine Activity. Now, at the sequence level, the return value of Routine Activity can set the value of the job parameter of the specific job.dtatem wrote:Hello To All:
Is there a way to run a Unix shell script from within a DataStage job, get the value returned by it, and assign it to a job-parameter to be used in existing job(s)
Thanks
dtatem
gateleys
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As suggested this can not be done in the job itself. However the approach suggested by gateleys adds an unnecessary layer of software; instead of a Routine activity, I would recommend an Execute Command activity to execute your script, upstream of your Job activity in a job sequence. The activity variable $ReturnValue can be used to retrieve the command's output for passing into a job parameter. You may need to Trim field marks (line terminators) from the script's output.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.