← All errors

CPF

CPF5027 Record in use by another job

Most common cause

The program reads for update (CHAIN or READ on a file opened for update, without (N)) a record locked by another job, and the lock lasts longer than the record wait time (WAITRCD).

Other causes

  • A program reads for update and then waits on a display, holding the lock while the user does nothing.
  • The job holding the lock is in MSGW, waiting for a reply.

How to fix it

The message names the job holding the record: look at it with WRKOBJLCK or DSPRCDLCK. In the code read with (N) when you do not update, release the lock with UNLOCK before going to a display, and handle %STATUS = 01218.

Related errors