Start of change

Free-Form Procedure Statement

A free-form procedure-beginning statement begins with DCL-PROC, followed by the procedure name, followed by keywords, and finally a semicolon. If there is no prototype for the procedure, and *DCLCASE is specified for the procedure-name parameter of the EXTPROC keyword, then the external name of the procedure is the same as the name specified for the DCL-PROC statement, in the same case.

A free-form procedure-ending statement begins with END-PROC, optionally followed by the procedure name, and finally a semicolon. If the name is specified, it must be the same as the name specified on the procedure-beginning statement.

The only directives that are allowed within a free-form procedure statement are /IF, /ELSEIF, /ELSE, and /ENDIF.
   DCL-PROC getCustName
       /IF DEFINED(EXPORT_ALL_PROCEDURES)
               EXPORT
       /ENDIF
               ;

Examples of procedure statements

End of change