Page 1 of 1

batch file creation

Posted: Thu Oct 16, 2008 6:28 am
by dodda
Hi,

I want to create a batch file. The batch file should 1st call the datastage job. Once the job is successful it should call the stored procedure.
Can you please provide me the procedure to write them? In datastage director i have an option to create a batch. can i use them or should i write a code to create batch file?

Thanks

Posted: Thu Oct 16, 2008 6:51 am
by ArndW
Do you wish to create a sequence in DataStage to start the job and then call a stored procedure, or do you wish to write a Windows .bat batch file to start the job then call a stored procedure?

Posted: Thu Oct 16, 2008 1:56 pm
by ray.wurlod
Version 4 does not have job sequences. You would need to do this using a job control routine. And - I believe - you'll need to construct a script to call the stored procedure unless it deals with a record set, in which case you can use an ODBC stage.

batch file creation

Posted: Thu Oct 16, 2008 10:00 pm
by dodda
ArndW wrote:Do you wish to create a sequence in DataStage to start the job and then call a stored procedure, or do you wish to write a Windows .bat batch file to start the job then call a stored procedure?

Hi Arndw,

I want to create a windows .bat batch file to run the job and then to run the stored procedure. Do you have any suggestions? Datastage 4.2 does not have sequencer.

Thanks

batch file creation

Posted: Thu Oct 16, 2008 10:02 pm
by dodda
ArndW wrote:Do you wish to create a sequence in DataStage to start the job and then call a stored procedure, or do you wish to write a Windows .bat batch file to start the job then call a stored procedure?

Hi Arndw,

I want to create a windows .bat batch file to run the job and then to run the stored procedure. Do you have any suggestions? Datastage 4.2 does not have sequencer.

Thanks

Posted: Fri Oct 17, 2008 1:20 am
by ray.wurlod
Use the dsjob command to run the DataStage job. Invoke the stored procedure via whatever command line interface the database you're using happens to have.