Run batch file to call a DS Job to run
Moderators: chulett, rschirm, roy
Run batch file to call a DS Job to run
I want to run a DS job without open the Data Stage program, so i want to create a batch file which will trigger a DS job when i double click on the batch file.
For example, i want to create a batch file called "Call_DSJob", after I double click this file, it will run the DS Job in DS background. The problem is i am not sure how to do it...
Appreciate if you guys can help me up
I have found from forum the syntax for batch file is
dsjob -server %vSERVER% -user %vUSER% -password %vPASSWORD% -run %vDS_PROJ_NAME% %vDS_JOB_NAME%
And my DS job details are:
1) Server : BI_Server
2) USer : admin
3) Password : 123
4) DS Proj Name : BI
5) Job Name : BI_DS_JOB
So is my syntax should look like this way?
dsjob -server %BI_Server% -user %admin% -password %123% -run %BI% %BI_DS_JOB%
Thanks.
For example, i want to create a batch file called "Call_DSJob", after I double click this file, it will run the DS Job in DS background. The problem is i am not sure how to do it...
Appreciate if you guys can help me up
I have found from forum the syntax for batch file is
dsjob -server %vSERVER% -user %vUSER% -password %vPASSWORD% -run %vDS_PROJ_NAME% %vDS_JOB_NAME%
And my DS job details are:
1) Server : BI_Server
2) USer : admin
3) Password : 123
4) DS Proj Name : BI
5) Job Name : BI_DS_JOB
So is my syntax should look like this way?
dsjob -server %BI_Server% -user %admin% -password %123% -run %BI% %BI_DS_JOB%
Thanks.
Last edited by ylai20 on Mon Nov 08, 2010 3:28 am, edited 1 time in total.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
There is no need to download manuals, the WebSphere DataStage Programmer's Guide that comes with every client installation has a whole Chapter (Chapter 1) describing the command line interface.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Ok, got it!
Can give me some simple sample...will be very much appreciated.
Is this command put inside the batch file, or need to type and run in command prompt? Sorry for asking so many 'dumb' question..i really have no idea..dsjob -run
[ -mode [ NORMAL | RESET | VALIDATE | RESTART ] ]
[ -param name
=
value ]
[ -paramfile filename ]
[ -warn n ]
[ -rows n ]
[ -wait ]
[ -stop ]
[ -jobstatus ]
[ -userstatus ]
[ -local ]
[ -opmetadata [ TRUE | FALSE ] ]
[ -disableprjhandler ]
[ -disablejobhandler ]
[useid] project job | job_id
Can give me some simple sample...will be very much appreciated.
the "dsjob" command is called from the command line - the syntax is identical in UNIX and Windows environments.
In your case the command
should start the job (any parameters will get their default values)
In your case the command
Code: Select all
dsjob -server BI_Server -user admin -password 123 -run BI BI_DS_JOB
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
But i want to create a batch file to run it when i double click, instead of using command prompt...Actually i will schedule Windows to execute this batch file...so should i copy this code into the batch file? Will it be the same?
And when i try to run it in command prompt, it said dsjob is not recognized..is this the way i should run?
C:\Documents and Settings\user>dsjob
'dsjob' is not recognized as an internal or external command,
operable program or batch file.
And when i try to run it in command prompt, it said dsjob is not recognized..is this the way i should run?
C:\Documents and Settings\user>dsjob
'dsjob' is not recognized as an internal or external command,
operable program or batch file.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I have copy the code and put in the batch file..
@ECHO ON
dsjob -server BI_Server -user admin -password 123 -run BI/Jobs/Backup/ TEST_NELSON
CLS
EXIT
The save this batch file to C:\IBM\InformationServer\Clients\Classic, where the dsjob.exe is located.
Then i execute it,
C:\IBM\InformationServer\Clients\Classic>dsdsjob -server BI_Server -user admin -password 123 -run BI\Jobs\Backup\EST_NELSON
But the command prompt just prompted out for a while, then it closed, when i check in the director, the job didnt run...am i doing the right way?
@ECHO ON
dsjob -server BI_Server -user admin -password 123 -run BI/Jobs/Backup/ TEST_NELSON
CLS
EXIT
The save this batch file to C:\IBM\InformationServer\Clients\Classic, where the dsjob.exe is located.
Then i execute it,
C:\IBM\InformationServer\Clients\Classic>dsdsjob -server BI_Server -user admin -password 123 -run BI\Jobs\Backup\EST_NELSON
But the command prompt just prompted out for a while, then it closed, when i check in the director, the job didnt run...am i doing the right way?
This is my final code in the batch file
After i double click, it 'seems' working but prompt command closed very fast.
When i check the director, this job is not running..
I have put this 2 batch files in server, location is
1) C:\IBM\InformationServer\Clients\Classic
2) C:\IBM\InformationServer\Server\DSEngine\bin
I have tried to run both, no luck..pls help..
Code: Select all
@ECHO ON
dsjob -server bi_server -user admin -password 123 -run bi
CLS
EXIT
When i check the director, this job is not running..
I have put this 2 batch files in server, location is
1) C:\IBM\InformationServer\Clients\Classic
2) C:\IBM\InformationServer\Server\DSEngine\bin
I have tried to run both, no luck..pls help..
I just got the solution in viewtopic.php?p=377446.
I need to create a sigon.file in order to run the batch file. May i know is it a neccesary to create this signon.file?
I need to create a sigon.file in order to run the batch file. May i know is it a neccesary to create this signon.file?
I don't understand some of the difficulties here. Can you, from the CMD prompt, execute your batch (without the CLS so you can see the messages) and get your job running?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>