ExecCommand
Moderators: chulett, rschirm, roy
ExecCommand
We have multiple environments. I would like to use the Exec Command stage to execute a BAT file. The problem is, I would like to change the directory structure to point to the Environment where the BAT file resides. I tried the following
ExecCommand: D:\DataStage\
Parameter: #ENV#\Test.bat
Because D:\Datastage\ isn't a command, it fails. Is there a prefix I can add to make it a command.
Thanks
ExecCommand: D:\DataStage\
Parameter: #ENV#\Test.bat
Because D:\Datastage\ isn't a command, it fails. Is there a prefix I can add to make it a command.
Thanks
Jim Stewart
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Hi Craig,
If I am not wrong. MKS ToolKit is installed by default on all windows installations of Datastage.
If I am not wrong. MKS ToolKit is installed by default on all windows installations of Datastage.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
You are wrong. I have worked in various versions, the latest being 7.5.1A (DS Server ed. on Windows) and MKS ToolKit was not included. I think it has been made available in 7.5.2 Windows Ed.Minhajuddin wrote:Hi Craig,
If I am not wrong. MKS ToolKit is installed by default on all windows installations of Datastage.
gateleys
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
My bad
I should have said Datastage "Enterprise Edition"
![Embarassed :oops:](./images/smilies/icon_redface.gif)
I should have said Datastage "Enterprise Edition"
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
D:DataStage can never be a command, I don't care how many prefixes you add to it. It's a Folder, pure and simple.
What precisely are you trying to achieve?
The best practice with scripts (or BAT files) is to use full pathnames. If you can't do that, use CD commands to get you where you need to be - and, if necessary, capture the current working directory's pathname before you do, so you can CD back again.
What precisely are you trying to achieve?
The best practice with scripts (or BAT files) is to use full pathnames. If you can't do that, use CD commands to get you where you need to be - and, if necessary, capture the current working directory's pathname before you do, so you can CD back again.
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.
Also, if you have parameterized your paths for job control, then you can refer to the parameter using the standard #parametername# notation.
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Ray,
But if we don't want a common directory to store script, is there a way to distinguish the directory path where the script resides.
I have been trying to use the CMD command and concatinate the parameter line. It's not working. Now I am trying to use the sh -c command. Still having problems with this.
Hopefully, I figure it out.
But if we don't want a common directory to store script, is there a way to distinguish the directory path where the script resides.
I have been trying to use the CMD command and concatinate the parameter line. It's not working. Now I am trying to use the sh -c command. Still having problems with this.
Hopefully, I figure it out.
Jim Stewart
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
OK, then start is a good suggestion on Windows (like source would be on UNIX).
The start command has plenty of useful options, too. Get to a CMD shell and type HELP START to get more information.
You can then put the entire command line that you actually want to execute into the Parameters field of the Execute Command activity.
The start command has plenty of useful options, too. Get to a CMD shell and type HELP START to get more information.
You can then put the entire command line that you actually want to execute into the Parameters field of the Execute Command activity.
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.
Forgot to mention that part - just 'start' as the command and everything else in the Parameter box. Thanks.
The biggest thing to realize with that stage is you can't put "half" of the command in one box and the other half in the second box as, when they are combined to be executed, a space is left between the two. That was your original problem, Raftsman.
The biggest thing to realize with that stage is you can't put "half" of the command in one box and the other half in the second box as, when they are combined to be executed, a space is left between the two. That was your original problem, Raftsman.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers