IMPORT{(external_name)}

The IMPORT keyword specifies that storage for the data item being defined is allocated in another module, but may be accessed in this module. The external_name parameter, if specified, must be a character literal or constant.

If a name is defined as imported but no module in the program contains an exported definition of the name, an error will occur at link time. See EXPORT{(external_name)}.

The IMPORT keyword on the definition specification is used to import data items and cannot be used to import procedure names. Procedure names are imported implicitly, to all modules in the program, when the EXPORT keyword is specified on a procedure specification.

The following restrictions apply when IMPORT is specified:

For a multiple-occurrence data structure or table, each module will contain its own copy of the occurrence number or table index. An OCCUR or LOOKUP operation in any module will have only a local impact since the occurrence number or index is local to each module.



[ Top of Page | Previous Page | Next Page | Contents | Index ]