View previous topic :: View next topic |
Author |
Message |
Dip Beginner
Joined: 24 Mar 2006 Posts: 27 Topics: 14
|
Posted: Wed Feb 21, 2007 8:59 pm Post subject: Can a database-trigger ( at row level) trigger a batch job |
|
|
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 |
|
|
blitz2 Beginner
Joined: 23 Jan 2007 Posts: 84 Topics: 14
|
Posted: Thu Feb 22, 2007 8:27 am Post subject: |
|
|
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 |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Wed Apr 11, 2007 2:00 pm Post subject: |
|
|
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 |
|
|
|
|