How to diffrentiate the parameters 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

How to diffrentiate the parameters in execute command stage

Post 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
VARUNKUMAR
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
jenkinsrob
Participant
Posts: 31
Joined: Mon Dec 01, 2003 6:24 am
Location: London

Post by jenkinsrob »

You need to 'hard-code' the spaces between your parameter values

e.g. #username#:' ':#password#
pneumalin
Premium Member
Premium Member
Posts: 125
Joined: Sat May 07, 2005 6:32 am

What version of you DataStage

Post 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.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can change it to ExecSH or ExecDOS and it works fine in all versions.

Command Stage serks.
Mamu Kim
kumar
Participant
Posts: 11
Joined: Wed Nov 23, 2005 10:33 pm

How to diffrentiate the parameters in execute command stage

Post 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
VARUNKUMAR
kumar
Participant
Posts: 11
Joined: Wed Nov 23, 2005 10:33 pm

Re: How to diffrentiate the parameters in execute command st

Post 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
VARUNKUMAR
pneumalin
Premium Member
Premium Member
Posts: 125
Joined: Sat May 07, 2005 6:32 am

That's why it goes wrong

Post 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!
kumar
Participant
Posts: 11
Joined: Wed Nov 23, 2005 10:33 pm

Re: That's why it goes wrong

Post 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
VARUNKUMAR
Post Reply