Calling a DS Job From Command Line
Moderators: chulett, rschirm, roy
Calling a DS Job From Command Line
I need to write a dos batch file to call a DS job where in the documentation should I look for that code and an example of it?
Jim
Jim
Sure I need help....But who dosent?
Technically, its:
dsjob -server ServerName -user UserName -password Password -run -mode NORMAL ProjectName JobName
You need to supply the values in italics. Being on Windows, you may be able to leave off the userid and password and have it use your current one, I'm not sure. NORMAL is assumed if no mode is passed, or you can RESET or VALIDATE a job instead of running it.
Note that this assumes no Job Parameters are being passed in. To do that, add as many 'name=value' pairs as you need, using "-param ParameterName=Value" syntax for each one. Insert these in the command line before your ProjectName and JobName. You can also slide in a "-warn" and a "-rows" if you like, much like in your example.
You can also add in one of the following - "-wait", "-jobstatus" or "-userstatus" to have the command wait for the job to finish before moving on and to pass back an exit status to the caller. Check the docs for the differences between the three.
dsjob -server ServerName -user UserName -password Password -run -mode NORMAL ProjectName JobName
You need to supply the values in italics. Being on Windows, you may be able to leave off the userid and password and have it use your current one, I'm not sure. NORMAL is assumed if no mode is passed, or you can RESET or VALIDATE a job instead of running it.
Note that this assumes no Job Parameters are being passed in. To do that, add as many 'name=value' pairs as you need, using "-param ParameterName=Value" syntax for each one. Insert these in the command line before your ProjectName and JobName. You can also slide in a "-warn" and a "-rows" if you like, much like in your example.
You can also add in one of the following - "-wait", "-jobstatus" or "-userstatus" to have the command wait for the job to finish before moving on and to pass back an exit status to the caller. Check the docs for the differences between the three.
Last edited by chulett on Tue Feb 10, 2004 8:51 am, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
On the UNIX side, it lives under the Engine in the "bin" directory... I'm guessing it's the same for Windows.JDionne wrote:ya thats where i was on my server in the ascential\datastage\engine dir and i typed in dsjob.exe and it told me that it wasnt a good command.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Typing in partial dsjob commands yields syntax (usage) summaries.
For example (once the DS Engine bin directory is in your PATH), try:
For example (once the DS Engine bin directory is in your PATH), try:
Code: Select all
dsjob
dsjob -run
dsjob -logsum
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.
Hi,
Just wanted to point out that you can do this on any pc even with no DS client installed, as long as you put the dsjob.exe and several dll's on that pc and it work's like a charm (especially for 3rd party usage - if you don't write a dll of your own for 3rd party applications, be it a regular C/C++ dll or a com dll)
if you still have problems tell us.
IHTH
Just wanted to point out that you can do this on any pc even with no DS client installed, as long as you put the dsjob.exe and several dll's on that pc and it work's like a charm (especially for 3rd party usage - if you don't write a dll of your own for 3rd party applications, be it a regular C/C++ dll or a com dll)
if you still have problems tell us.
IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
OK I found the dsjob.exe file right were you guys said it would be. I have taken the sample code from this post and it errored out saying it didnt understand the switches. This is what my code looks like
dsjob -server scrbbususcnc04 -user webi -password 29DmJj13 -mode NORMAL Development Load456msg
isnt there suposed to be a -run in this some were?
Jim
dsjob -server scrbbususcnc04 -user webi -password 29DmJj13 -mode NORMAL Development Load456msg
isnt there suposed to be a -run in this some were?
Jim
Sure I need help....But who dosent?