Defining Fields or Values Based on Elements

You can use element references to define the size, type, and number of decimals for fields when you modify Lawson 4GL form, report, or working storage library files. The fields that reference the element inherit the element properties as those are defined in the database definition. You can change the properties of an element, recompile your applications, and have the new definition used for all fields that reference the element. For more information on how to define fields and elements within the database definition, see Doc for Developers: Application Development Workbench.

For example, you could have the Company, ToCompany, and FrCompany fields reference the Company element in the 4GL code and forms to define ToCompany and FrCompany, instead of using the PIC clause.

You can also reference the size and number of decimal attributes where an integer or constant might be used in procedure files.

Three kinds of Lawson 4GL source can use the LIKE reference to an element:

The report definition (RD) and form definition (SD) files should not reference elements.