A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett , rschirm , roy
bella0813
Participant
Posts: 7 Joined: Fri Apr 23, 2010 2:46 pm
Post
by bella0813 » Mon Apr 26, 2010 10:25 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Apr 26, 2010 10:36 am
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 » Tue Apr 27, 2010 8:34 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Apr 27, 2010 10:04 am
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 » Tue Apr 27, 2010 1:18 pm
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 » Tue Apr 27, 2010 1:28 pm
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 » Tue Apr 27, 2010 2:37 pm
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.