Hi DSGurus,
How to pass parameters for running a job in unix (dsjob -run <<project name>> <<name job name>>)
let say the parameters were located in a table
Thanks
vinod
passing parameters for dsjob
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
dsjob -run -param name1=value1 -param name2=value2 -jobstatus project job
I'd prefer an approach using a job sequence, but you specified "from the operating system".
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.
You can even store all your parameters in a flat file and pass this file to -param argument.
The format of the parameter file should be:
paramater1=value
parameter2=value
parameter3=value
..
..
And your command would become
dsjob -run -param parameterfile.txt project job
The format of the parameter file should be:
paramater1=value
parameter2=value
parameter3=value
..
..
And your command would become
dsjob -run -param parameterfile.txt project job
Nitin Jain | India
If everything seems to be going well, you have obviously overlooked something.
If everything seems to be going well, you have obviously overlooked something.
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
Oh yess..
The command would remain
dsjob -run -param name1=value1 -param name2=value2 project job
Anupam is right that for each parameter used in the job we need to specify in -param argument,
-param name1=value1, name2=value2, ... , namen=valuen
Still we can have a file where we keep all the parameters used in the job, in the format explained in previous post and can use it to pass the value to parameters in the command line, like..
dsjob -run -param name1=$value1 -param name2=$value2 project job, where values to $value1 and $value2 variables are passed from the flat file.
Moreover you can use -lparams option with dsjob command to automate fetching the parameters defined in jobs if you have more than one jobs to run through single script. This way, you facilitate all the jobs to get their parameters' value from a single parameter file.
The command would remain
dsjob -run -param name1=value1 -param name2=value2 project job
Anupam is right that for each parameter used in the job we need to specify in -param argument,
-param name1=value1, name2=value2, ... , namen=valuen
Still we can have a file where we keep all the parameters used in the job, in the format explained in previous post and can use it to pass the value to parameters in the command line, like..
dsjob -run -param name1=$value1 -param name2=$value2 project job, where values to $value1 and $value2 variables are passed from the flat file.
Moreover you can use -lparams option with dsjob command to automate fetching the parameters defined in jobs if you have more than one jobs to run through single script. This way, you facilitate all the jobs to get their parameters' value from a single parameter file.
Nitin Jain | India
If everything seems to be going well, you have obviously overlooked something.
If everything seems to be going well, you have obviously overlooked something.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Is this documented somewhere? (I don't have access to DataStage at the moment.)koolnitz wrote:You can even store all your parameters in a flat file and pass this file to -param argument.
The format of the parameter file should be:
paramater1=value
parameter2=value
parameter3=value
..
..
And your command would become
dsjob -run -param parameterfile.txt project job
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.
Ray, please refer to my last reply on this thread.
dsjob -run -param parameterfile.txt project job is wrong command as pointed out by Anupam.
I am not sure if this format has been documented anywhere, but this is what we are using in many of our projects, and it's working absolutely fine.
We are maintaining multiple such parameter files, and based on the requirement we pass the different parameter file to the script where we kick off DS jobs, and there it passes the values to the job parameters.
dsjob -run -param parameterfile.txt project job is wrong command as pointed out by Anupam.
I am not sure if this format has been documented anywhere, but this is what we are using in many of our projects, and it's working absolutely fine.
We are maintaining multiple such parameter files, and based on the requirement we pass the different parameter file to the script where we kick off DS jobs, and there it passes the values to the job parameters.
Nitin Jain | India
If everything seems to be going well, you have obviously overlooked something.
If everything seems to be going well, you have obviously overlooked something.