The system field ``++SY-SUBRC++`` must be tested immediately after any statement setting this variable. Reading this variable informs on previous operation success or errors. Such errors should be handled properly so that the program continues in a consistent state.
This rule raises an issue when the field ``++SY-SUBRC++`` is not checked just after performing one of the following operations:
* Calling a function or method which can throw exceptions.
* Calling one of the file access operation ``++OPEN DATASET++``, ``++READ DATASET++`` or ``++DELETE DATASET++``.
``++SY-SUBRC++`` check must be done either with the ``++CASE++``, ``++IF++`` or ``++CHECK++`` statement.
* One or more ``++WRITE++`` operation are performed between the statement setting ``++SY-SUBRC++`` and its check. An exception will be however raised if the ``++WRITE++`` operation is a ``++WRITE ... TO++``, as this will set ``++SY-SUBRC++`` too.
* ``++SY-SUBRC++``'s value is assigned to a variable. We then assume that it will be checked later.