EXTERNAL data item visibility shift when moving from ANSI COBOL 85 to COBOL 2002 with IBM Enterprise COBOL V6 linker options
0 reputation · 28 Nov 2020, 00:51 UTC
The goal is to understand whether EXTERNAL data items become publicly accessible across separately loaded modules when upgrading from legacy COBOL to newer compiler versions that modify linkage behavior.
Constraints include the differing definitions of EXTERNAL in ANSI COBOL 85 versus COBOL 2002, the IBM Enterprise COBOL V6 THREAD and NOEXTERNAL linker options, and the Micro Focus Visual COBOL –fexternaldll flag, which each affect how symbols are placed in the process address space.
Uncertainty remains about whether omitting NOEXTERNAL or enabling THREAD places EXTERNAL items in a shared segment visible to any COBOL or non‑COBOL code in the same process, and whether the Micro Focus flag changes this exposure.
Does enabling the THREAD option or omitting NOEXTERNAL cause EXTERNAL items to be placed in a shared segment accessible to any module in the same process? Does the Micro Focus –fexternaldll flag alter this behavior? How can developers verify the visibility of EXTERNAL items after a version upgrade without introducing test harnesses?