View previous topic :: View next topic
|
Author |
Message |
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi,
I have inserted a record into a table.
Can it in a way trigger a batch job?
Something similar to DSN trigger batch jobs for CA7 schedule
Thanks. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
I think Yes, You can first create a DB2 SP which gets triggered on a INSERT and then in that you can submit INTRDR. Talk to DBA's too first.
But why do you want such thing to happen? |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Thank you..
Can you please throw more light on the option that you have provided
My requirement is:
A process will load 100000+ rows in a table A multiple times during a day. Simultaneously the same process will insert an identifying record for the batch in another table B.
As soon as the process inserts the identifying record in Table B, it needs to trigger subsequent batch process to make use of the records loaded in Table A.
Table B is just a thought.
Any other suggestions are welcomed. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Option-1
Quote: |
Can you please throw more light on the option that you have provided |
It should have some answers for you.
ibmmainframes.com/post-155574.html
Option-2
You have not provided much info hence the answers will be limited
Quote: |
As soon as the process inserts the identifying record in Table B |
Whatever process you have, can it do a FTP of dummy file at the end? if yes then You can use CA7, to start a job with the successful ftp of a dataset-- Talk to scheduling Team in your shop and discard the earlier approach.
Quote: |
Any other suggestions are welcomed. |
Option-3
Another approach is to have a job scheduled hourly ( or whatever) which will pick up the data in table A and process whatsoever inserted by that time.
In all of these processes make sure you don't delete/update/insert in batch process and it is just a SELECT with UR as this has strong chances of contention. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Just a thought if you want something to happen in realtime why do you need to choose a batch method? |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Thank you Rohit.. I had thought of Option 3 but was rejected by a senior.
I have discussed and made him agreed for option 3.
For Pandora Box
I need to process several batches (100000+ records) on a daily basis..once the batches are ready for processing, the previous process would notify us by inserting an identifying record in another table. My process would then read this table to check if any batch is available to process. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Quote: |
I have discussed and made him agreed for option 3 |
Good!!
6 years back working with one of the Bank on Trading platform where if any orders are cancelled through CICS Screens during the business hours (Back Door) then allocated money used to get Credited back by EoD which made user short of money so we introduced option 3 where every 30 Minutes a DB2 Batch will keep check for cancelled orders and CR back the money. |
|
Back to top |
|
|
|