The ::REQUIRES Directive

Use the ::REQUIRES directive when a program needs access to the classes and objects of another program, program_name. This directive takes the form:

::REQUIRES program_name

The ::REQUIRES directive must precede all other directives, and the order of the ::REQUIRES directives determines the search order for the classes and routines defined in the named programs.

REXX uses local routine definitions within a program over routines of the same name accessed through ::REQUIRES directives. Local class definitions within a program override classes of the same name in other programs accessed through ::REQUIRES directives. Another directive (or the end of the program) must follow a ::REQUIRES directive.


[Back: The ::ROUTINE Directive]
[Next: How Directives Are Processed]