I am creating several similar (but not the same) invocations of the list form of the WTO macro in the global scope of my program:
__asm(
"xxxUtilsStaticWtp WTO TEXT=*,ROUTCDE=(11),LINKAGE=,MF=L \n" // Static list form WTO
: "DS"(xxxUtilsStaticWtp) // DS name to locate list form of WTO
); ...
__asm(
"xxxUtilsStaticSWto WTO TEXT=*,ROUTCDE=(2,10),DESC=(3),LINKAGE=,MF=L \n" // Static list form WTO
: "DS"(xxxUtilsStaticSWto) // DS name to locate list form of WTO
);
(Yes, I know that one has the label inside the assembler statement declaration and one does not, it does not appear to matter either way).
When this gets compiled, the compiler emits this information about these variables:
xxxUtilsStaticSWto Class = static, Length = 256
Type = struct __ASM_DS_256
3180-10:741, 3211-10:770
xxxUtilsStaticWtp Class = static, Length = 256
Type = struct __ASM_DS_256
3089-10:650, 3136-10:695
Plus this error message:
ERROR CCN3244 XXXXX.XXXXX.H(XXXUTILS):741 External variable XXXUTILS cannot be redefined.
(Note that it works fine if one of the declarations is removed).
If I understand this correctly, the compiler is shortening the name down to eight characters (I am not using GOFF) so both of these are colliding with name XXXUTILS.
I know that I can keep other kinds of declarations at the global scope from being EXTERNAL by adding "static" to the declaration, e.g.
static int MyRoutine(int Input) { <code> }
or
static int AnInt = 5;
I spent some quality time with Inline assembly statements (IBM extension), but could not divine how to somehow squeeze the word "static" into the __asm statement or if there was another way to do it.
Anybody have any ideas on how to accomplish this?
Thank you, Scott Fagen