18.8 Lock Timeout

These notes apply to non-IBM i platforms

A lock timeout is treated by LANSA as a fatal error unless LANSA's lock timeout handling is switched on. In fact, by default, most databases wait indefinitely for locks to be resolved and thus lock timeouts do not occur. Some databases allow a lock timeout to be set globally, for example, Oracle on Windows. If that is done and a lock timeout occurs, then a fatal error would occur with the LANSA application.

Once you have enabled LANSA to trap lock timeouts LANSA will still set IO$STS=ER. Thus if special handling is not provided by the developer, current error handling will be executed, but it will no longer be a LANSA fatal error, it is just an IO error.

Therefore, it is imperative that you check for a lock error by using the system variable *DBMS_RECORD_LOCKED. Without it, the user will not get any extra messages describing the reason for the error.

In summary, if you switch lock timeouts ON, then you will still get an IO error and you MUST check for a lock timeout by using the system variable *DBMS_RECORD_LOCKED.

Also see

18.8.1 Lock Timeout Configuration

18.8.2 Lock Timeout Behavior Examples