RPG (IBM i / AS/400) · File status code

Status Code 01218

What does Status Code 01218 mean in RPG (IBM i / AS/400)?

A CHAIN, READ, or UPDATE tried to obtain a record for update but another job already holds a lock on it, and the record-wait time (WAITRCD) expired before that lock was released.

Status Code 01218IBM i / OS/400 · ILE RPG

Condition

A CHAIN, READ, or UPDATE tried to obtain a record for update but another job already holds a lock on it, and the record-wait time (WAITRCD) expired before that lock was released.

Fix

Trap %STATUS = 01218 and retry after a short delay or tell the user the record is in use, and check whether WAITRCD needs tuning or another job is holding locks too long.

Related file status code