== Why is this an issue?

When accessing a non-input-only file with a ``++CHAIN++``/``++READx++`` operation, the record is locked and becomes inaccessible to the system, and unreadable other programs. This is fine if you are about to update the record immediately, but if you have data processing to do following the read, it can leave the record unavailable for too long. Therefore, non-input files using the ``++CHAIN++``, ``++READ++``, ``++READE++``, ``++READP++``, and ``++READPE++`` operation codes should always be accessed with the no lock option, ``++(N)++``.


=== Noncompliant code example

[source,rpg]
----
FDDDLJNL7  UF   E           K DISK    INFSR(*PSSR) 
... 
C                   READ      DDDLJNL7
----

[source,rpg]
----
FDDDLJNL7  UF   E           K DISK    INFSR(*PSSR) 
... 
 /free
    read DDDLJNL7;
 /end-free
----


=== Compliant solution

[source,rpg]
----
FDDDLJNL7  UF   E           K DISK    INFSR(*PSSR) 
... 
C                   READ(N)   DDDLJNL7 
----

[source,rpg]
----
FDDDLJNL7  UF   E           K DISK    INFSR(*PSSR) 
... 
 /free
    read(n) DDDLJNL7;
 /end-free
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Add the "N" option to this file access.


endif::env-github,rspecator-view[]
