Crossed Update error message when accessing Logical Views on Other Files

Date:8 December 2008
Product/Release:LANSA for iSeries (All Versions)
Abstract:Crossed Update checking may return a false positive when accessing a logical view which contains only a subset of the physical file fields
Submitted By:LANSA Technical Support

Description:

When fetching from, and updating a logical on an Other File, in some cases the message Record to be updated has been changed by another job/user will be shown, even though no such change has occurred. The I/O will also fail with a VE status.

Reason:

On LANSA defined files, crossed update checking is done using the @@UPID value, and if this changes between fetch and update, a validation error is issued. However, for Other files LANSA takes a snapshot of the field values at the time of the read, and compares them to the values at the time of the update.

If a logical view does not contain all the fields from the physical file, the crossed update check will have blank values for some fields in the file. When the Insert is done, these blank values may cause the crossed update check to give a false positive result.

Workaround:

This is unavoidable due to the way that the crossed update check works, hence the workaround just involves using the physical file instead of the Logical. After fetching the record from the logical file, fetch the same record from the physical file using the relative record number, and then perform the update on the physical instead of the logical file.