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
Can we invoke a DataStage job from other tools Cotrol Tools
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 41
- Joined: Fri Jun 04, 2004 5:52 am
- Location: Bangalore
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- 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
Tom,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
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..
![Wink ;-)](./images/smilies/icon_wink.gif)
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..
![Wink ;-)](./images/smilies/icon_wink.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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%
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%