Parameterize the shell script path in Execute command stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumar
Participant
Posts: 11
Joined: Wed Nov 23, 2005 10:33 pm

Parameterize the shell script path in Execute command stage

Post by kumar »

In the Execute command stage i given command line as "sh /data/customer/Personal/fine.sh" this is hard coded.
We tried parametterzing the Execute command path and the name but datastage doesn't allow us to parameterize the shellscript path.The script to run should be soft-coded.so please tell me how to make the parameterize the shell script path?.and also is any other stage used to parameterize the shell script
VARUNKUMAR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try just putting sh (or /bin/sh) in as the hard coded part.

On the parameters line, add a job parameter reference to the pathname of your script.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Varun,

I believe you should be able to do this, the way Ray has mentioned.

To your next question, there is no particular stage just for parameterization. It is for this purpose (pass parameters) that the Parameters box is given in the execute command stage, so that you can set the parameter names here.

Regards,

The Bird.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,

If the path is going to be changed less, you have another option.
Create a environmental varible and use it in the execute command.

Code: Select all

$PATH/shell.sh
-Kumar
Post Reply