IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Trigger


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Jan 17, 2013 9:37 pm
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
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: 1020
Location: India

PostPosted: Fri Jan 18, 2013 12:07 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to define transaction that trigge... CICS 3
No new posts Trigger mainframe job , when file pla... All Other Mainframe Topics 2
No new posts trigger enter key automatically call ... CICS 17
No new posts Application not run by time HH:MM tri... IBM Tools 1
No new posts How to track incoming input files tha... JCL & VSAM 6
Search our Forums:

Back to Top