1. We created a COBOL program that added a record in the audit file.
2. We then created a CL program that wrote the before and after images to a data queue. At the end of the day, we copied the data from the data queue to the audit file.
The second approach was much faster than the first, but still it's not that fast.
I was wondering if there is a better approach to take.
OS/400 journals are really the best performing option for auditing record changes. The only way to really speed up a trigger program is to write the images to a data queue, which you've already done. Journaling is done at a much lower level in the system, so it's going to perform better than trigger auditing.
================================== MORE INFORMATION ON THIS TOPIC ==================================
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this Search400.com Featured Topic: Database issues resolved
This was first published in July 2003