Page 1 of 1

DSExecute problem

Posted: Tue Jul 29, 2003 11:52 pm
by calvinlo
Hi all,

I've tried to use sequencer and server job to execute unix command in different ways but i found there's a problem..
when i try to execute "mv #inputfile# #outputfile#"
it seems that datastage really run this command(accept "#inputfile#" as parameter) instead of passing parameters to the command (in director it shows the following,
Usage: mv [-i | -f] [--] src target
or: mv [-i | -f] [--] src1 ... srcN directory)
. And so it only works when i hardcode the parameters. Anyone can help?

Thanks,
Cal

Posted: Wed Jul 30, 2003 12:06 am
by calvinlo
I am sorry that this problem only occurs when i use "Execute Command" in "Job Sequencer" job.....am i using the right stage("Execute Command") if i hope to execute unix command ?

Thanks,
Cal

Posted: Wed Jul 30, 2003 12:55 am
by spracht
Cal

it's essential to compose the command string the right way. I never used sequencer, but did something similar as ExecSH -> before-job sobroutine, where you wouldn't have the "" around the command. If this is no solution, maybe you have to concatenate(:) the elements of the command like:

"mv ":#inputfile#:" ":#outputfile#" or
"mv ":inputfile:" ":outputfile"

Thus the actual values for #inputfile# and #outputfile# are passed.

As everything after '#' on a shell command line is considered to be comment, the shell got just "mv " and therefore issued the usage message.


Stephan

Posted: Wed Jul 30, 2003 5:28 am
by vmcburney
That's correct except in a sequence stage you don't need to use the # around parameter names.
In an execute stage just put this into the command field:
mv
And this into the command line parameter field:
inputfile : " " : outputfile

Vincent McBurney
Data Integration Services
www.intramatix.com

Posted: Wed Jul 30, 2003 9:55 pm
by calvinlo
Thanks for your help.

but i still cannot use "execute command" in "sequencer" to execute unix script with correct parameters passed. now i just use server job to do that.. the drawback is i cannot view the the unix command flow graphically.

Cal

Posted: Thu Jul 31, 2003 12:00 pm
by mhester
Cal,

This issue has already been sent to Ascential (07/10/2002 & 03/09/2003) and was originally reported in version 5.2.1. The article or case number(s) are G18903 and G9065.

This is considered an enhancement and there is no timeline for when it will be enhanced.

Many times it is a good (first) idea to check the Ascential e-Support website then check the forum. I have seen many of the items posted here that have either been submitted to Ascential or fixed in a certain release.

Article G9065 (07/10/2002) does give a workaround to this as editing the job control code. This cannot be done from the job control window, rather there are other ways to do this, although should not be taken lightly and I won't give out this information to the general population. Those of you who know how to do it - will and those that do not probably should not be doing it.

Michael Hester

Posted: Thu Jul 31, 2003 12:43 pm
by ariear
Cal,

You can allways write a transform routine/BeforeAfter routine that runs DSExecute in it using parameters and execute it in the Sequencer with the right parameters and even capture reurn status or output from the command. With the right annotation/JobActivity nothing is lost in your flow

Posted: Thu Jul 31, 2003 1:01 pm
by mhester
As I'm sure we will see - there are many ways to accomplish what you need. My only intent was to address the original issue with current status and give a solution that was issued via one of the articles.

Posted: Thu Jul 31, 2003 1:58 pm
by kduke
Cal

I think the workaround is to run a job that executes the shell script. That would have to work. You can pass the parameters to the job.

Michael is the bug list available to users?

Kim.

Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com

Posted: Thu Jul 31, 2003 4:34 pm
by mhester
Kim,

Not that I know of. There is an exhaustive list of bugs, enhancements etc.. although they are not made public (for obvious reasons).

A good bet is that if the customer has maintenance and you have a login to the e-Support site then you can search and possibly find an answer. This is really quite a good site and getting better all the time. I have experienced great success with researching many of my issues and resolving them prior to posting or perusing forum sites.

Michael Hester