The use of ``++options( *nopass )++`` on a parameter makes it optional, so it should always be checked before use.


== Noncompliant Code Example

----
       DCL-PR VIOLATION1 EXTPGM;
         LASTNAME Char(10);
         FIRSTNAME Char(10) OPTIONS(*NOPASS:*OMIT);
       END-PR;

       DCL-PI VIOLATION1;
         LASTNAME Char(10);
         FIRSTNAME Char(10) OPTIONS(*NOPASS:*OMIT);
       END-PI;

       dsply FIRSTNAME;
       dsply LASTNAME;  // Noncompliant; LASTNAME is optional
       *inlr = *on;
----


== Compliant Solution

----
       DCL-PR VIOLATION1 EXTPGM;
         LASTNAME Char(10);
         FIRSTNAME Char(10) OPTIONS(*NOPASS:*OMIT);
       END-PR;

       DCL-PI VIOLATION1;
         LASTNAME Char(10);
         FIRSTNAME Char(10) OPTIONS(*NOPASS:*OMIT);
       END-PI;

       dsply FIRSTNAME;
       IF %PARMS > 1;
         dsply LASTNAME;
       EndIf;
       *inlr = *on;
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
