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

Status Code 01215

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

An explicit OPEN operation was issued against a file that was already open, either because the cycle opened it automatically or because a previous OPEN was never matched with a CLOSE.

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

Condition

An explicit OPEN operation was issued against a file that was already open, either because the cycle opened it automatically or because a previous OPEN was never matched with a CLOSE.

Fix

Guard explicit OPEN operations with %OPEN() so the open is skipped when the file is already active, and make sure every explicit OPEN has a matching CLOSE in the program's control flow.

Related file status code