
In the following example, the variable GLOBAL_DATA is
exported from a module which does not have the THREAD
keyword on a Control statement. The storage type of the variable
is all-thread static.
If this file is copied into source with THREAD(*CONCURRENT)
specified in a Control statement, the variable would default to
have the storage type of thread-local static which would not be
compatible with the exported variable.
Defining it with the STATIC(*ALLTHREAD) keyword ensures
that it will be compatible with the exported variable.
DCL-S GLOBAL_DATA CHAR(100)
IMPORT
/IF DEFINED(*THREAD_CONCURRENT)
STATIC(*ALLTHREAD)
/ENDIF
;
