call a package in a Sequence Job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bella0813
Participant
Posts: 7
Joined: Fri Apr 23, 2010 2:46 pm

call a package in a Sequence Job

Post by bella0813 »

HI,

I have a seqeunce job, that has 4-5 Job Activity within in. Sequentially arranged to run one after the other.

One of the Job activity is inserting in a table miliions of rows in oracle.

before, this job activity begins, I want to check if there is data in the table for a particular condition. THis logic is in a package.

My question is how to call package within this sequence, before this job begins. Your help is appreciated.

thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Typically from the command line using whatever utility exists for that using the Execute Command stage. For example in Oracle: sqlplus. And that usually with a wrapper script rather than a direct call.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mosheh
Participant
Posts: 9
Joined: Sat Jul 05, 2008 9:16 am
Location: Sandbox

Post by mosheh »

Another option: create a server job that use the Stored Procedure stage (STP) to call your package. Run the job from the sequence
Moshe H.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup, that's another option providing you have Server jobs at your disposal. Only reason I mention that is the original post is labelled with a Job Type of "TX".
-craig

"You can never have too many knives" -- Logan Nine Fingers
bella0813
Participant
Posts: 7
Joined: Fri Apr 23, 2010 2:46 pm

Post by bella0813 »

thank you both for your reply.
I should be able to create a server job...
bella0813
Participant
Posts: 7
Joined: Fri Apr 23, 2010 2:46 pm

Post by bella0813 »

I do have one more question before I start changind this.

So I create a server job that calls a package which does some processing,
I call this server job in between the sequence

How do i make sure the next job does not kick start or kick starts only on success of this server job?

thank you for your help
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You use a trigger on the Job activity.

This is stock standard sequence programming 101.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply