MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Kick off a Job using DB2 Trigger

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
GeminiK_80
Beginner


Joined: 26 Apr 2005
Posts: 7
Topics: 3

PostPosted: Wed Apr 27, 2005 5:58 pm    Post subject: Kick off a Job using DB2 Trigger Reply with quote

Hi!
We have a set of DB2 batch Jobs running in production daily.

Now, my requirement is to check the updates on the DB2 tables since yesterday and if there are any updates on it, run the jobs otherwise donot run them.

Is there any way to achieve this?

Thanks in advance.
_________________
Thanks,
Gemini K.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu Apr 28, 2005 7:31 am    Post subject: Reply with quote

Geminik_80,

Do you have a date/timestamp field that specifies if an update is performed? if you have then you can unload the table and check for empty file and then trigger your jobs.

If there is nothing to differentiate the update then you may have to maintain a gdg. Unload the table every day and compare it against yesterday's unload. If you found any mismatches then trigger the jobs.

Another alternative is to create a file whenever an update is performed. Now check this file for empty and trigger the jobs if it has atleast 1 record.

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Apr 28, 2005 7:55 am    Post subject: Reply with quote

The trigger can invoke a strored procedure and that can write out the JCL as a file to a DD that has it's output going to INTRDR.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group