Quoted Strings as Parameter
Moderators: chulett, rschirm, roy
Quoted Strings as Parameter
We have a requirement where we need to pass quoted parameters do the dsjob command
dsjob -run -param acctype='a b c' <project name> <job name>
But ds comes back with an invalid argument message. If we remove the spaces between the values, it works
dsjob -run -param acctype='abc' <project name> <job name>
Can you pls let me know if you have come across similar scenarios and what you did to over come this problem?
Thanks
dsjob -run -param acctype='a b c' <project name> <job name>
But ds comes back with an invalid argument message. If we remove the spaces between the values, it works
dsjob -run -param acctype='abc' <project name> <job name>
Can you pls let me know if you have come across similar scenarios and what you did to over come this problem?
Thanks
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Put eval before dsjob (eval dsjob -run -param ) or include the parameter name also into the quote and try.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Did you try escaping the quote characters?
Code: Select all
dsjob -run -param acctype=\'a b c\' <project name> <job name>
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ray,
While using the escape character, it comes back with a message
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>
Status code = -9999 DSJE_DSJOB_ERROR
If we just past the quote character without the escape character, it runs but truncates the value at the first space.
Thanks
While using the escape character, it comes back with a message
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>
Status code = -9999 DSJE_DSJOB_ERROR
If we just past the quote character without the escape character, it runs but truncates the value at the first space.
Thanks
Guessing this should work, if you want to pass 'a b c' as the parameter value.
HTH
Code: Select all
dsjob -run -param acctype="'a b c'" <project name> <job name>
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
we just progressed a step ahead. The original command I was trying to execute was in the project directory with the -local option, it does not work...as below.
/app/dsadm/Ascential/DataStage/DSEngine/bin/dsjob -run -wait -warn 0 -param SRCE_SYS_NM="I P" -local <ProjName> JobA2
But if I remove the -local optiona and execute it from the bin directory it works...as below
dsjob -run -wait -warn 0 -param SRCE_SYS_NM="I P" <ProjName> JobA2
/app/dsadm/Ascential/DataStage/DSEngine/bin/dsjob -run -wait -warn 0 -param SRCE_SYS_NM="I P" -local <ProjName> JobA2
But if I remove the -local optiona and execute it from the bin directory it works...as below
dsjob -run -wait -warn 0 -param SRCE_SYS_NM="I P" <ProjName> JobA2