Execute command activity 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
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Execute command activity stage

Post by Jayakannan »

Hi,

DataStage version 7.1

In my sequencer job design i am using Execute Command Activity Stage to invoke a Shellcript. I need to pass the parameters in that stage.

When i am trying to pass the Environment variables or user defined variables as parameter it is not getting passed to the Shellscript.

If i hard code the parameter value then it is getting passed to the Shellscript.

Is there any specific way to pass the Environment variables or user defined variables in Execute Command Activity Stage (DS v7.1)???

Regards,
Kannan
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You will need to pass your job parameters in the form #ParameterName# to your external command.
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

I have passed the environment variable as #$parameter# and user defined variable as #parameter#. But its not working. :(
ajay.vaidyanathan
Participant
Posts: 53
Joined: Fri Apr 18, 2008 8:13 am
Location: United States

Execute command activity stage

Post by ajay.vaidyanathan »

Hi,

In the Execute Command Stage, there will be two tabs. In the TOP one defined your shell (ksh,...) and the bottom mention your script whatever you are trying to call (xyz.sh,...)... Is this the way you are calling your script in your Execute Command Stage... ???

If this is not the way you are calling it, then it will not get the parameters...
Regards
Ajay
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

There are 2 tabs. First one is Command tab where i have mentioned shellscript name (abc.sh) and second one is Parameters tab where i have mentioned the parameters which needs to be passed to the script.

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

Post by chulett »

And there's no need to pass environment variables to it as they are already accessible to it, being part of the environment and all.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ajay.vaidyanathan
Participant
Posts: 53
Joined: Fri Apr 18, 2008 8:13 am
Location: United States

Execute command activity stage

Post by ajay.vaidyanathan »

Jayakannan,

The first tab (COMMAND) is for specifying your shell alone (ksh...)
In the second tab (PARAMETERS) you need to specify your script name with the parameter values passed to it.
Regards
Ajay
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, you only "need" to do it that way if the path to your script/command is parametrised as well. What they've said that they are doing should be working fine.

You need to tell us what "not working" means - that statement by itself means nothing. Show us your exact input and output, log entries, etc so we have some clue about what you are doing and what you are seeing.

If no joy comes of this, contact your official support provider and see if it is a 7.1 issue, which is a... pretty darn version old nowadays.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply