MODULE

Topics:

How to:

Reference:

The MODULE command accesses a source code library so the current procedure can use the class definitions of the library and Maintain Data functions. A library is a nonexecutable procedure, and is implemented as a component called an import module.

Syntax: How to Use the MODULE Command

The MODULE command must immediately follow the MAINTAIN command. The syntax of the MODULE command is

MODULE IMPORT (library_name [,library_name] ... );

where:

library_name

Is the name of the library to import as a source code library. Specify its file name without an extension. The file must reside in the path defined by the EDASYNR environment variable.

If a library is specified multiple times in a MODULE command, Maintain Data will include the library only once in order to avoid a loop.

Reference: Commands Related to MODULE

  • DESCRIBE. Defines classes. You can use DESCRIBE to include classes in a library.
  • CASE. Defines a function. You can use CASE to include functions in a library.

What You Can and Cannot Include in a Library

You can include most Maintain Data language commands and structures in a library. However, there are some special opportunities and restrictions of which you should take note:

  • Other libraries. You can place one library within another, and can nest libraries to any depth. For example, to nest library B within library A, issue a MODULE IMPORT B command within library A.

    If a given library is specified more than once in a series of nested libraries, Maintain Data will only include the library once in order to avoid a loop.

  • Top function. Because a library is a nonexecutable procedure, it has no Top function.
  • Forms. A library cannot contain forms.
  • Data sources. A library cannot refer to data sources. For example, it cannot contain data source commands (such as NEXT and INCLUDE) and cannot refer to data source stacks.

WebFOCUS

Feedback