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 

Can a database-trigger ( at row level) trigger a batch job

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


Joined: 24 Mar 2006
Posts: 27
Topics: 14

PostPosted: Wed Feb 21, 2007 8:59 pm    Post subject: Can a database-trigger ( at row level) trigger a batch job Reply with quote

Can a database-trigger ( at row level) trigger a batch job

I have a requirement of sending the extract/dump of few look up tables from my system to some other external system in a flat file in batch mode. These look up table values are expected to be changed once in a 4/5 months.
So i dont want to send the file in a weekly or monthly basis as 90% of the time i will be sending the same data.

I am palnning to send the whole dump from the look up table whenever there is a change/insert/delete of a row(or multiple rows) in that particular table.


Any other suggestions?

Thanks in advance!!
Dip
Back to top
View user's profile Send private message Yahoo Messenger
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Thu Feb 22, 2007 8:27 am    Post subject: Reply with quote

how would the updates be made?.. Why not try to FTP the update in some form when an update is made to the table.

I don't know any SQL statement that can submit a batch job!
________
Subaru Impreza history


Last edited by blitz2 on Wed Feb 02, 2011 3:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Wed Apr 11, 2007 2:00 pm    Post subject: Reply with quote

Dip,

I can think of an indirect way to do that. Define your trigger to call a DB2 stored procedure. Define a ddname pointing to the Internal Reader on your SPAS or WLM job (depending on whether your DB2 stor proc runs in SPAS or WLM). In your stored procedure, build the job to extract the data from the tables and write it to the ddname which is defined to INTRDR. That should submit your batch job.
Hence, eventually your DB2 trigger would submit a batch job. I remember reading about this approach somewhere. Try the IDUG archives.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
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