Execute DSJOB Command Remotely

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dec1177
Premium Member
Premium Member
Posts: 22
Joined: Mon Aug 06, 2007 2:26 pm

Execute DSJOB Command Remotely

Post by dec1177 »

Hello.

I have a very simple .bat file with the following DOS commands:

@ECHO OFF
dsjob -server myServerName -user myUserName -password myPassword -run myProjectname myJobName
CLS
EXIT

When I execute this .bat file on the ETL server via a Remote Desktop Connection, the .bat file executes successfully. However, if I attempt to execute the .bat file from my Desktop that's on the same network, nothing happens. After reading the Server Job Developer's Guide page 19-140, I was lead to believe I could execute a DSJOB command from a remote computer on the network...is this not the case? What am I missing?

Any help is much appreciated.
I don't know signatures...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Be more precise about "not working". What error code/message do you get?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dec1177
Premium Member
Premium Member
Posts: 22
Joined: Mon Aug 06, 2007 2:26 pm

Post by dec1177 »

Ray,

Thanks for the response. I modified the .bat file a bit so that it would echo the command and pause so I could see the resulting message. The message is as follows:

"'dsjob' is not recognized as an internal or external command, operable program or batch file."


Does this mean the dsjob.exe has to be present on both computers on the network?
I don't know signatures...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This means it couldn't find your local "dsjob.exe" on your PC. You will need to add your dsjob.exe to your PC environment's path or explicitly code the location into your .bat program.
dec1177
Premium Member
Premium Member
Posts: 22
Joined: Mon Aug 06, 2007 2:26 pm

Post by dec1177 »

Thanks ArndW. Explicitly coding the location of my local dsjob.exe did the trick. As a helpful tip for anyone else that may come across this issue, this is exactly what my dsjob command line looks like now:

"C:\Program Files\Ascential\DataStage7.5.2\dsjob" -server myServerName -user myUsername -password myPassword -run myProject myJobName

I had to include the path in quotes because of the fact there's a space in the pathname (I think). The .bat file executes perfectly now.
I don't know signatures...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

dec1177 wrote:I had to include the path in quotes because of the fact there's a space in the pathname (I think).
Yup. Thank you Windows "long filenames". :wink:

Or you could have used the original recipe 8.3 "short" name without quotes, which is (more than likely) "Progra~1".
-craig

"You can never have too many knives" -- Logan Nine Fingers
dec1177
Premium Member
Premium Member
Posts: 22
Joined: Mon Aug 06, 2007 2:26 pm

Post by dec1177 »

Absolutely right. Using:

C:\Progra~1\Ascential\DataStage7.5.2\dsjob ....etc.

(without the quotes) works as well.

Thanks again.
I don't know signatures...
Post Reply