Import namespaces

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
IMPORT namespace



A namespace or nested namespace to import.


An IMPORT statement imports the specified namespace from a prototype file or from another .dbl source file into the current .dbl source file, enabling you to use members of that namespace without having to type the fully qualified member name. A namespace defined in a file is available only to that file unless it is explicitly imported into other files in the compilation unit with IMPORT or, in traditional Synergy, implicitly imported with SYNDEFNS. A namespace imported with IMPORT applies only to the file into which it is imported.

An IMPORT statement should go at the beginning of the source file, before any other declarations. It cannot occur inside of a namespace declaration.


An implicit main—that is, a PROC statement or a data division construct such as RECORD without the MAIN keyword—cannot immediately follow an IMPORT statement (although it can occur elsewhere in the program or source file). If a main routine immediately follows an IMPORT statement, it must have the keyword MAIN.

If namespace is a nested namespace (for example, MyNamespace.Subnamespace), only the nested namespace is imported (and not the parent namespace). Conversely, a nested namespace is not imported automatically when its parent namespace is imported. Each nested namespace requires its own IMPORT statement.

See also

Importing a namespace


The statement below imports members of the Namespace1 namespace to the current file.

import Namespace1