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
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

execute command stage

Post by dspxguy »

I am calling a script in the execute command stage and would like to parameterize the path of the shell script.
what is the syntax for it?

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Just enclose the parameter name in pound/hash/# marks like usual.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a known bug in older versions of DataStage where this does not work. Let us know your version.
Last edited by kduke on Tue Jun 26, 2007 8:44 pm, edited 1 time in total.
Mamu Kim
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

7.5.2
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No bug there, so...
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

chulett wrote::? Just enclose the parameter name in pound/hash/# marks like usual.
I am getting this error "executable path cannot contain parameters"


In the command field I want to parametrize the path ?
Any advice would be appreciated.
Thanks
michaeld
Premium Member
Premium Member
Posts: 88
Joined: Tue Apr 04, 2006 8:42 am
Location: Toronto, Canada

Post by michaeld »

You can call the command from within a shell. The input box that takes in the command would execute a command to create a new instance of a shell and the parameters would be the path of the command that you want to run.

I do this in windows. For example if I want to execute c:\var_path\mike.exe where the path is dynamic I would set it up like this.

Command input box:

CMD.EXE

Parameters input box:

/C #jpVarPath#mike.exe #jpParam1# #jpParam2#
Mike
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

michaeld wrote:You can call the command from within a shell. The input box that takes in the command would execute a command to create a new instance of a shell and the parameters would be the path of the command that you want to run.

I do this in windows. For example if I want to execute c:\var_path\mike.exe where the path is dynamic I would set it up like this.

Command input box:

CMD.EXE

Parameters input box:

/C #jpVarPath#mike.exe #jpParam1# #jpParam2#
Michael my script is in unix box ( /home/folder/filename.sh)
I tried using CMD.sh in command field and in the parameter field #param# which has the whole path of the script , , but it doesnt work.
"Output from command ====>
SH: line 1: CMD.sh: command not found"
Any idea what am I doing wrong here?

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That example was Windows specific. Try using plain old 'sh' instead.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

chulett wrote:That example was Windows specific. Try using plain old 'sh' instead. ...


It worked, Thanks Michael and Chulett..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark thread as Resolved
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply