The ``++CONST++`` keyword on a subprocedure's parameter indicates that the parameter value will not be changed by the subprocedure. This is not just a nice way to communicate with the programmers who will call the procedure. It also offers performance benefits, because it allows the compiler to produce more optimized code. Further, using ``++CONST++`` means that a field of a similar data type will automatically be converted to the correct type and size for the parameter.


== Noncompliant Code Example

----
     D X               S             15A   INZ('ABC')

     P SubProc1        B
     D SubProc1        PI
     D  Parm1                        15A    // Noncompliant; read-only. Should be CONST
     D  Parm2                        15A
      /Free
       X = Parm1;
       Parm2 = X;
       return;
      /End-free
     P SubProc1        E
----


== Compliant Solution

----
     D X               S             15A   INZ('ABC')

     P SubProc1        B
     D SubProc1        PI
     D  Parm1                        15A   CONST
     D  Parm2                        15A
      /Free
       X = Parm1;
       Parm2 = X;
       return;
      /End-free
     P SubProc1        E
----



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

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

include::message.adoc[]

'''
== Comments And Links
(visible only on this page)

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