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.
In a free-form definition, you can specify *DCLCASE
for the external_name parameter,
indicating that the external name
of the item is the
same as the name of the item, in the same case as the name
is specified.
See Specifying *DCLCASE as the External Name.
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.
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.