Hi,
I want to pass a parameter from Unix command prompt to Datastage UV prompt.
eg: SELECT * FROM DS_JOBS WHERE NAME=<PARAMETER>
The value of the parameter has to be passed from Unix Prompt to UV prompt (i.e after executing the steps
1 cd `cat /.dshome`
2 . ./dshome
3 bin/dssh
4.Execute a command which uses a parameter passed from command prompt.
Is there any way to achieve this
Passing arguments to bin/dssh
Moderators: chulett, rschirm, roy
Passing arguments to bin/dssh
Aim high
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You almost had it! The technique is called inline prompting. In its simplest form it is the prompt text surrounded by double angle brackets:
The parameter value can be supplied in response to the prompt from a "here script" within your script.
If you are going to use this more than once (for example in a loop) it would be wise to include an "always prompt" control.
Finally there are two errors in your example. The script that you need to execute is dsenv, not dshome. There is no DS_JOBS table in the dshome account; you need to cd to a project directory.
Code: Select all
SELECT * FROM DS_JOBS WHERE NAME=<<Job name>> ;
Code: Select all
cd `cat /.dshome`
. ./dsenv
cd $1 # project directory pathname
bin/dssh "SELECT * FROM DS_JOBS WHERE NAME=<<Job name>>;" << XYZ
$2 # job name
XYZ
Code: Select all
SELECT * FROM DS_JOBS WHERE NAME=<<A,Job name>> ;
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.