ENT 

Coding User-Defined Function Definitions

The following syntax rules must be adhered to for user-defined functions under DIALECT"ENTCOBOL"

  1. the FUNCTION-ID paragraph relating to the user-defined function must be contained within the IDENTIFICATION DIVISION.
  2. The end of the user-defined function definition is indicated by the END FUNCTION keyword.
  3. The PROCEDURE DIVISION header's RETURNING phrase must also be contained within the user-defined function, to indicate the function's returning item.
  4. The USING phrase of the PROCEDURE DIVISION header may contain zero or more parameters of the user-defined function, which can be passed BY REFERENCE or BY VALUE. When passing items in .NET COBOL code, the directive MANAGED-FNC-PARAM-BY controls the default method.