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
 

 

DB2 Trigger

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

New User


Joined: 10 May 2007
Posts: 32
Location: Portugal

PostPosted: Thu Jan 17, 2013 4:31 pm    Post subject: DB2 Trigger
Reply with quote

Hi all,
after the IMS topic (link), I am now investigating the DB2 applications, that should be easier.

I believe the best approach to identify what has been updated/deleted is by creating a trigger that saves/sends somewhere the PK of the record changed.

Is this possible?

All I want to know is which record was changed, it does not mather what. I think that creating a new table to keep this info will not be the best solution (trigger with an insert statement), but if I could call some JCL and with a simple COBOL program write the PK on a dataset I think the results will be better.

Is this possible? Are there any other solutions?

Regards
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 17, 2013 9:37 pm    Post subject:
Reply with quote

Hello,

Why do you believe that submitting a new job for every update/delete would be appropriate?
Back to top
View user's profile Send private message
rafaelantunes

New User


Joined: 10 May 2007
Posts: 32
Location: Portugal

PostPosted: Thu Jan 17, 2013 10:32 pm    Post subject:
Reply with quote

Well, actually I don't but in comparison with the insert statement I thought it was better... icon_confused.gif

I am evaluating other possible solutions, like the ROW CHANGE TIMESTAMP or reading log datasets with COBOL, but I haven't reached any conclusion...

Any help will be much appreciated.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jan 18, 2013 12:07 pm    Post subject:
Reply with quote

rafaelantunes,

From what i understood from the link is, that you have 15 source systems and if anything gets updated there it should be updated to your new target system.

Solution : REPLICATION.

Things that are not clear from your post is, you have mentioned 15 systems, is it 15 different applications in your company or 15 different databases residing at different places in the world on different database technology.

You should read about "IBM - InfoSphere Replication Server". You can google on "ims db2 replication".
This will get your updates in real-time(real-time minus couple of seconds/minutes based on setting data will be available in target).

Very oldest technique is Trigger, which has lots of disadvantages. For big applications you don't want to go on that road where performance matters. If its for just testing purposes, just to get an idea you can use triggers.

Other Solutions, for DB2 you can use CA Log Analyzer to get the undo & redo's SQL's/Unload form which you can run everyday via JCL. I am not sure whether same tool is available for IMS.

Thanks,
Sushanth
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 Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts How to track incoming input files tha... shreya19 JCL & VSAM 6 Thu Feb 25, 2016 6:15 pm
No new posts Issue in trigger vickey_dw DB2 3 Wed Feb 10, 2016 5:41 pm
No new posts Trigger a mainframe job by mail Praveen Thenraj IBM Tools 8 Wed Jan 13, 2016 12:05 pm
No new posts Setting up a new trigger krisprems DB2 4 Thu Dec 24, 2015 10:33 pm


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