Exit work area

The exit work area is explained in Passing data between exits. You can use this area to optimize the SQL that your IRD needs to perform for an update call.

Assume that you have a file containing a 10-element array, and each array occurrence corresponds to a separate row in DB2®. When you use a secondary table for handling repeating groups, a REWRITE call may update none, some, or all of the array data. This means that the IRD exit has to perform a combination of SQL INSERT, UPDATE, and DELETE calls.

To avoid potentially unnecessary SQL calls, add code to the FBE to store the array in the exit work area on a get-for-update (GETU) call. On an update call, compare the data and only issue SQL calls if the data has changed.

This technique is valid only if your programs update the last record read. If there is a possibility that a program reads several records and then performs an update against any previously read record, this technique is not valid.


Concept Concept

Feedback


Timestamp icon Last updated: Monday, 10 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.vt.doc//topics/cvtdecExitWorkArea.html