RPG (IBM i / AS/400) · File status code
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.
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.
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.