Try OpenEdge Now
skip to main content
Guide for New Developers
An overview of ABL : Understanding ABL Syntax : Procedures
 

Procedures

The procedure is the fundamental block in Progress. All types of procedures, external and internal, have certain common properties:
*They can contain all other types of blocks.
*You can execute them by name using the RUN statement.
*They can accept run-time parameters for input or output.
*They can define their own data and user interface environment (context) with restrictions depending on the type of procedure.
*They can share data and widgets defined in the context of another procedure, with restrictions depending on the type of procedure.
*They can execute recursively. That is, they can run themselves in a new context.
There are two types of procedures: external and internal. An external procedure block consists of a text file containing zero or more statements that you can compile into a unit and that you can execute by name using the RUN statement. An external procedure is the most basic block and can contain all other types of statements and blocks.
An internal procedure block consists of a PROCEDURE statement followed by one or more statements terminated by an END statement that you can execute by name using a RUN statement. An internal procedure is always compiled as part of an external procedure. An internal procedure cannot contain other internal procedure blocks, but it can contain any other type of statement or block that an external procedure can contain.
* User-defined Functions