HOw to start the datastage job from win bat file or DOS mode

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
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

HOw to start the datastage job from win bat file or DOS mode

Post by ICE »

HI All,

May I know how to start the datastage jobs using window bat file or MS DOS prompt???
I believe that we can do that like unix shell script.Am I right?
:roll:


Thanks,
suresh.narasimha
Premium Member
Premium Member
Posts: 81
Joined: Mon Nov 21, 2005 4:17 am
Location: Sydney, Australia
Contact:

To Start DS Job from a batch file of windows

Post by suresh.narasimha »

Hi,

I gues this should help you when you put this in a batch.

C:\Ascential\DataStage\Engine\bin\dsjob -server <server_name> -user <User_Name> -password <somepwd> -run <Project_Name> <Job_Name>

Regards,
Suresh N
SURESH NARASIMHA
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, the dsjob command. Read the Command Line Interface section of the Server Job Developer's Guide for details.
-craig

"You can never have too many knives" -- Logan Nine Fingers
MikeGoldrick
Premium Member
Premium Member
Posts: 4
Joined: Thu Feb 26, 2004 3:08 pm

An example in a ".bat" file

Post by MikeGoldrick »

:runjob
C:\Ascential\DataStage\Engine\Bin\dsjob -file %fname% %rserver% -run -jobstatus %project% %job%
::
if not errorlevel 2 goto end
C:\Ascential\DataStage\Engine\Bin\dsjob -file %fname% %rserver% -run -mode RESET %project% %job%
C:\Ascential\DataStage\Engine\Bin\dsjob -file %fname% %rserver% -logsum -type INFO -max 50 %project% %job%
::

where
%fname contains the userid/pwd in a file
%rserver is the server name
%project is the ds project name
%job is the job you are running

The 1st dsjob runs the job
The 2nd Resets the job if it abends
The 3rd dumps parts of the log file

Hope that helps.
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear All,

Thank u so much.Thanks a lot.
I will try and let u know then.
I really appreciate you all advise.

Thanks a lot.. :)
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear All,

I solve it.
I can start the DS job from Dos mode. Thank you all.Especially thanks a lot and thank you so much Suresh and Mike. I really appreciate you 2 advise.
Thanks........thanks a lot........... :D


Thanks in advance.
U
Participant
Posts: 230
Joined: Tue Apr 17, 2007 8:23 pm
Location: Singapore

Post by U »

ICE wrote:Dear All,

Thank u so much.Thanks a lot.
I will try and let u know then.
I really appreciate you all advise.

Thanks a lot.. :)
Please don't let me delay your search for someone who cares.

U is my name.
"YOU" is a personal pronoun.
Please get it right.
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear U,

Could u pls chk ur private msg?

Thanks,

U wrote:
ICE wrote:Dear All,

Thank u so much.Thanks a lot.
I will try and let u know then.
I really appreciate you all advise.

Thanks a lot.. :)
Please don't let me delay your search for someone who cares.

U is my name.
"YOU" is a personal pronoun.
Please get it right.
Post Reply