Can we invoke a DataStage job from other tools Cotrol Tools

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
tombastian
Premium Member
Premium Member
Posts: 41
Joined: Fri Jun 04, 2004 5:52 am
Location: Bangalore

Can we invoke a DataStage job from other tools Cotrol Tools

Post by tombastian »

Hi All,
Is it possible to invoke a DataStage Job from outside its environment using any other job control tools (Tivoli or Control M) or independantly like an executable script.

Thanks ,
Tom
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Yes and its very common to use those other tools. The dsjob command works from the command line, accepts a large number of options such as setting parameters and retrieving messages, and can be used to start jobs. Have a look in the server job developers guide for a description or do a forum search on dsjob.
peternolan9
Participant
Posts: 214
Joined: Mon Feb 23, 2004 2:10 am
Location: Dublin, Ireland
Contact:

Re: Can we invoke a DataStage job from other tools Cotrol To

Post by peternolan9 »

tombastian wrote:Hi All,
Is it possible to invoke a DataStage Job from outside its environment using any other job control tools (Tivoli or Control M) or independantly like an executable script.

Thanks ,
Tom
Tom,
I have published the C++ code required to invoke DS jobs. (I've also published a scheduler to run any commands on win/unix including DS jobs. This way it's possible to have far greater contol of DS jobs than with DS itself.....as strange as that sounds..;-)....)

You can use this code or you can use the command line interface provided with DS...the C++ code I wrote is similar to what is in the DS manual.

See my manual for details...

http://www.peternolan.com/downloads/Ins ... 0Guide.zip

I've got a new version not published yet that fetches parameters for a job from a database table and sets the parameters according to the parameter/value pairs in the table. This get's rid of needing parameter files and jobs to set parameters from parameter files...

All the code is public and free on win2000.

It's not free on unix platforms because I have to actually provide all the source code rather than just the .exes on unix. (Whos got Solaris/AIX/HP machines at home..;-) )
Best Regards
Peter Nolan
www.peternolan.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I've got an AIX machine at home! :D
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
noamz
Participant
Posts: 9
Joined: Sun Oct 17, 2004 2:29 pm

Post by noamz »

You can do it by invoking a simple CMD with the CTLM.
Example for CMD with reacting to the retorn code to parameter errorlevel, but you can juct use the bold line:

SET GUILOGON=NO
"C:\Ascential\DataStage\Engine\bin\DSJOB" -server SERVERNAME -run -jobstatus -wait -userstatus PROJNAME JOBNAME(case sensetive)
Set ERROR_LOAD=%errorLevel%
ren P:\DW_PROD\%PROJ%\IS\*.DAT *.DATBAK
IF %ERROR_LOAD% == 1 GOTO LOADOK
GOTO LOADFAILED

:LOADOK
echo '%PROJ%ML ended'>g:\bll.ctm\ETL_RUN_LOGS\RUN_LOGS\%PROJ%ML.END
exit 0

:LOADFAILED
echo '%PROJ%ML ABENDed'>g:\bll.ctm\ETL_RUN_LOGS\RUN_LOGS\%PROJ%ML.ABN
type g:\BLL.CTM\ETL_LOG_CTLM\LOG_CTLM\%proj%
exit %ERROR_LOAD%
Post Reply