Page 1 of 1

How to diffrentiate the parameters in execute command stage

Posted: Tue Dec 13, 2005 8:39 am
by kumar
hi


I am executing the sh.script in datastage using Execute command stage. I am unable to diffrentiate the parameters.

example:#username# #password#

So please tell me which character is used instead of space between two parameters

thanks

Posted: Tue Dec 13, 2005 8:45 am
by ArndW
the runtime parameter values replace the #parametername# and then the result is sent, unmodified, to the command line. There is no special character used to replace the space.

Perhaps you could explain the problem you are getting.

Posted: Tue Dec 13, 2005 3:49 pm
by jenkinsrob
You need to 'hard-code' the spaces between your parameter values

e.g. #username#:' ':#password#

What version of you DataStage

Posted: Tue Dec 13, 2005 6:01 pm
by pneumalin
Kumar,
1. When using execute command stage, ensure that you put your parameter in "Parameters" entry field. Do not place them all in one line with Shell script in "Command" entry field.

2. Upgrade to latest patch to 7.5.1.A if you still have problem on using it. I remember this problem persists in lower version.

Posted: Tue Dec 13, 2005 8:25 pm
by kduke
You can change it to ExecSH or ExecDOS and it works fine in all versions.

Command Stage serks.

How to diffrentiate the parameters in execute command stage

Posted: Wed Dec 14, 2005 3:51 am
by kumar
hi

Thanks for your help. I am having total 3 parameters example
#username#
#password#
#filename#

and I given like syntax #username#:' ':#password#:' ':#filepath#
and I am unable to get the result.
please can you tell how to give parameters in execute command stage ?

from
kumar

Re: How to diffrentiate the parameters in execute command st

Posted: Wed Dec 14, 2005 4:53 am
by kumar
Hi,

Just to expand on the previous post, I have a shell script in which I have defined 3 parameters as $1,$2 and $3. I have to execute this script from the Execute Command activity by passing these 3 parameters. In the sequence, I have defined these 3 parameters as "Username", "Password" and "Filepath".

When I try to pass these parameters in the Execute Command activity's Parameters tab as -

Code: Select all

#username#: :#password#: :#filepath# 
though the job successfully completes, the scipt is not executed completely (that functionality in the script which uses these parameters is not executed).

But when I pass these 3 parameter values in a single parameter, the script is executed perfectly fine.

Eg: #Param#=<username> <password> <Filepath>

Please tell me where I am going wrong. I would like to pass these values as 3 DataStage parameters.

Any help on this would be appreciated.

Thanks and Regards,

Kumar
kumar wrote:hi

Thanks for your help. I am having total 3 parameters example
#username#
#password#
#filename#

and I given like syntax #username#:' ':#password#:' ':#filepath#
and I am unable to get the result.
please can you tell how to give parameters in execute command stage ?

from
kumar

That's why it goes wrong

Posted: Wed Dec 14, 2005 10:03 am
by pneumalin
Kumar,
you should place them in Parameter field as following:
#USERID# #PASSWORD# #ANYPARAM#

Do not try to concatenate them using :
The Parameter entry field is just an entry field. It cannot understand the syntax, and will see ":" as a character..

Let mw know how it goes!

Re: That's why it goes wrong

Posted: Mon Dec 19, 2005 1:15 am
by kumar
hi thanks for your help. the syntax is working .we have to give space between two parameters same like
#USERID# #PASSWORD# #ANYPARAM#

thanks