|
The use of triggers is an excellent way of creating audit files without changing any core programs. One thing that you must ensure though is the output file used in the trigger must be in the library list. As the library lists are limited to 25 libraries, QGPL is often ommitted to make way for another application library. The IBM recommended approach is to put all the trigger programs and output files into the same library as the file the trigger is added to. This way you know the output file and trigger will be in the library list (Unless someone us using SQL or DFU). dlane@unipres.com Sent by: To: jbausers-l@midrange.com jbausers-l-admin@mi cc: drange.com Subject: Re: JBA ML - Application manager question 09/01/02 06:31 Please respond to jbausers-l This will work an any physical file you want to track changes. We have done this on a few files that we have an interest in knowing what and when changes were made and who made them. Create a physical file to hold the data you want to capture, ie task information, user, date and time. Write a program to write to the file data that a database trigger will pass to the program. Create database triggers (after insert, after update and after delete) that will call the program and pass the before and after record data from the physical file (APG35PHY). The program will be called when a record in the physical file (APG35PHY) is inserted, updated or deleted by any method, ie, JBA application program, DBU or SQL. Place the program and the hold file in library QGPL. For complete information on how to write trigger programs and create triggers, see the IBM publication "DB2 UDB for AS/400 Database Programming." David Lane Sr. Programmer/Analyst Unipres USA, Inc _______________________________________________ This is the GEAC/JBA System 21 Users (JBAUSERS-L) mailing list To post a message email: JBAUSERS-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/jbausers-l or email: JBAUSERS-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/jbausers-l. *******************Confidentiality and Privilege Notice******************* This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Thorn Australia Pty Ltd has implemented anti-virus software and whilst all care is taken, it is the recipients responsibility to ensure that any attachments are scanned for viruses prior to use.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.