Before Release 5.2, an SQL SELECT was always performed prior to the insert, update, or delete for the CRTOBJ, CHGOBJ, and DLTOBJ function types. However, where a prior read is not required, not performing the SQL SELECT can result in significant performance gains.
In current releases the SQL SELECT is suppressed for CHGOBJ, DLTOBJ, and CRTOBJ unless any of the conditions shown in the following table are true.
|
|
Conditions in which the SQL SELECT Is Required |
Reason SQL SELECT Is Required |
|---|---|---|
|
CHGOBJ |
Null update suppression is on. |
To compare images to see if the record needs to be updated. |
|
|
The CHGOBJ is embedded in the DBF Record’ user point in the EDTFIL, EDTRCD(1-3), or EDTTRN function types. |
To compare images to ensure that the record has not been modified by another user. |
|
|
There is action diagram code in any of the user points in the CHGOBJ. |
Action diagram code in CHGOBJ usually indicates that changes to the DB1 context are needed prior to update |
|
|
There are output parameters specified for the CHGOBJ. |
To return data for those fields that are not being updated but merely returned to the calling function. |
|
CRTOBJ |
The CRTOBJ is embedded in the DBF Record’ user point in the EDTFIL, EDTRCD(1-3), or EDTTRN function types. |
To check for a duplicate key and to issue a message to the screen in order to terminate the write attempt. |
|
|
There is action diagram code in the if data record already exists’ user point |
To allow the action diagram logic to be executed. |
|
DLTOBJ |
The DLTOBJ is embedded in the DBF Record’ user point in the EDTFIL, EDTRCD(1-3), or EDTTRN function types. |
To compare images to ensure that the record has not been modified by another user. |
|
Copyright © 2014 CA.
All rights reserved.
|
|