Running Jobs from Routines
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Tue Jul 26, 2005 11:12 pm
- Location: Bangalore
Running Jobs from Routines
Can we run jobs from Routines?
Yes, you can run jobs easily from routines.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Sorry, I was being a typical consultant - I answered your question but didn't help you at all :D
You need to use DataStage routines to call jobs from routines.
1. DSAttachJob() to "open" the job for use
2. DSPrepare() [optional] to prepare a perhaps aborted job
3. DSSetParam() [optional] to set parameter values
4. DSRunJob() to actually run the DataStage job
5. DSWaitForJob() [optional] to wait for the job to complete
There are other routines which you might want to use, but these are the normal ones. The Basic Programmer's guide will describe all of these routines in detail.
If you wish an example, create a Sequencer and do one job activity. Then in the Director look at the Job Control tab to get an example of how these calls work.
You need to use DataStage routines to call jobs from routines.
1. DSAttachJob() to "open" the job for use
2. DSPrepare() [optional] to prepare a perhaps aborted job
3. DSSetParam() [optional] to set parameter values
4. DSRunJob() to actually run the DataStage job
5. DSWaitForJob() [optional] to wait for the job to complete
There are other routines which you might want to use, but these are the normal ones. The Basic Programmer's guide will describe all of these routines in detail.
If you wish an example, create a Sequencer and do one job activity. Then in the Director look at the Job Control tab to get an example of how these calls work.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
You have Enterprise Edition of DataStage, and you probably work in parallel jobs, you use the Parallel Job Developers Guide to build those jobs. Ascential have cunningly hidden job control documentation in the Server Job Developers Guide, even though it pertains to all job types and not just server jobs. Open up the Server Job Developers Guide and peruse the chapter on BASIC programming, especially the section on job control.
An even easier way to work it out is to create a batch job. These old dinosaurs are created from the Director Tools - Batch menu and they come with a combo box that lists all jobs, when you choose a job and hit the "Add Job" button it dumps all the code into the code box for running the job. You can then copy and paste it to a routine and modify it to make it more generic.
An even easier way to work it out is to create a batch job. These old dinosaurs are created from the Director Tools - Batch menu and they come with a combo box that lists all jobs, when you choose a job and hit the "Add Job" button it dumps all the code into the code box for running the job. You can then copy and paste it to a routine and modify it to make it more generic.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ascential have cunningly hidden job control documentation in the Server Job Developers Guide
That's because a job sequence is just a special case of a server job. :D
That's because a job sequence is just a special case of a server job. :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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.