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

Status Code 00012

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

A CHAIN, SETLL, or SETGT operation searched for a key value or relative record number that does not exist in the file, so no record was retrieved. This is a normal not-found condition, not an abend, and shows up any time the search argument doesn't match an existing record.

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

Condition

A CHAIN, SETLL, or SETGT operation searched for a key value or relative record number that does not exist in the file, so no record was retrieved. This is a normal not-found condition, not an abend, and shows up any time the search argument doesn't match an existing record.

Fix

Test %FOUND() (or the resulting indicator) immediately after the operation instead of assuming the search succeeded, and branch around the record-processing logic when it is off.

Related file status code