Problem with Execute Command Satge

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
raj158347
Participant
Posts: 26
Joined: Thu Apr 19, 2007 5:15 am
Location: Chennai

Problem with Execute Command Satge

Post by raj158347 »

Hi All
I am facing problem while executing command through Execute command Stage,
Actually am trying to execute the one script through Execute command Stage,
If i give the absolute path of the command then the command triggered properly,
(csh test/test1.csh)
But the same time if am executing through Parameter values it is not triggered,
(csh #DIRNMAE#/#FILENAME#)
But it shows command execute successfully in the data Stage director
Please advice me to solve this issue


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

Post by chulett »

#DIRNMAE#?

What exact 7.x version do you have? Before 7.5.x there are known issues where parameters are properly expanded in the job's log but the actual command run leaves in the parameter names and hashes.

For example, you put "csh #DIRNAME#/#FILENAME#" in the stage and it logs the fact that it ran "csh test/test1.csh" - when in actuality it ran it exactly as it looks in the stage.

Also, make sure you put "csh" in the Command box and "#DIRNAME#/#FILENAME#" in the Parameter box.
-craig

"You can never have too many knives" -- Logan Nine Fingers
raj158347
Participant
Posts: 26
Joined: Thu Apr 19, 2007 5:15 am
Location: Chennai

Post by raj158347 »

Hi
Thank for your quick response,
Actually I am using 7.1 Version.
#DIRNAME# is job parameter
I have tried the option, which you that also not working.
Please let me know if any other way to solve this issue.


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

Post by chulett »

Upgrade. There's only a couple of 'work arounds' in that version - either stop using parameters and hard-code everything or replace the Execute Command stage with a Routine Activity stage that executes the command using DSExecute. You'll have full control over the parameters there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
raj158347
Participant
Posts: 26
Joined: Thu Apr 19, 2007 5:15 am
Location: Chennai

Post by raj158347 »

Hi
Thank you very much,Now am going to implement through routine.

Regards
Raj
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can switch it to a routine stage which will use the parameter values.
Mamu Kim
Post Reply