Building sequence jobs

For more complex designs, you can build sequence jobs to run multiple jobs in conjunction with other jobs. By using sequence jobs, you can integrate programming controls into your job workflow, such as branching and looping.

IBM® InfoSphere® DataStage® includes a special type of job, known as a sequence job, that you use to specify a sequence of parallel jobs or server jobs to run. You specify the control information, such as the different courses of action to take depending on whether a job in the sequence succeeds or fails. After you create a sequence job, you schedule it to run using the InfoSphere DataStage Director client, just like you would with a parallel job or server job. The sequence job is listed in the InfoSphere DataStage repository and in the InfoSphere DataStage Director client.

Designing sequence jobs

Designing a sequence job is similar to designing a parallel job. You create the sequence job in the Designer client and add stages. The stages that you add are known as activities. When you link two activities together, you define the triggers that define the flow of control. The job sequence includes properties and can have parameters, which are passed to the activities in the sequence job.

Each activity also contains properties that are passed to other activities in the sequence job. As with stages, you can define job parameters for each activity. You can test the parameters in the trigger expressions, and pass the parameters to other activities in the sequence job.

The following sequence job shows a sequence that runs the Demo job. If this sequence job runs successfully, the success trigger causes the Overnightrun sequence job to run. If the Demo job fails, the Failure trigger causes the Failure sequence job to run.

Figure 1. Sample sequence job

Shows a sample job sequence which runs one job and then one of two jobs depending on whether the first job succeeded or failed