Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can a DB2 insert trigger execution of a Batch Job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Tue Nov 24, 2015 10:44 pm    Post subject: Can a DB2 insert trigger execution of a Batch Job
Reply with quote

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
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Nov 25, 2015 12:59 am    Post subject:
Reply with quote

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
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Wed Nov 25, 2015 3:44 am    Post subject: Reply to: Can a DB2 insert trigger execution of a Batch Job
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Nov 25, 2015 4:03 am    Post subject:
Reply with quote

Option-1
Quote:
Can you please throw more light on the option that you have provided

It should have some answers for you.
http://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
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Sun Nov 29, 2015 6:46 pm    Post subject:
Reply with quote

Just a thought if you want something to happen in realtime why do you need to choose a batch method?
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Sun Nov 29, 2015 10:47 pm    Post subject: Reply to: Can a DB2 insert trigger execution of a Batch Job
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Mon Nov 30, 2015 9:18 pm    Post subject:
Reply with quote

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. icon_wink.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us