Conditions Relating to Control Specification Keywords
Conditions Relating to Control Specification Keywords
*THREAD_CONCURRENT : This condition is defined if the THREAD(*CONCURRENT) keyword is specified on a Control statement.
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.
```rpgle
DCL-S GLOBAL_DATA CHAR(100)
IMPORT
/IF DEFINED(*THREAD_CONCURRENT)
STATIC(*ALLTHREAD)
/ENDIF
;
```
*THREAD_SERIALIZE : This condition is defined if the THREAD(*SERIALIZE) keyword is specified on a Control statement.