If an INTERNAL static variable is unused, the compiler will not allocate any storage for it.
For example, if the following declaration is the only reference to the variable build_data, then no storage would be allocated for this variable and its initial value would not be in the generated text.
dcl build_data char(30) var static
init('Compiled in build 17');
If the ABNORMAL attribute is specified on a level-1 static variable, the compiler will allocate storage for the variable. For example, to keep the variable above, you could change the declaration above to:
dcl build_data char(30) var static abnormal
init('Compiled in build 17');
Do not apply the ABNORMAL attribute indiscriminately to all variables or all static variables - this will both slow down your compilation and worsen the performance of the generated code.
If you specify the compiler option STATIC(FULL), the compiler will apply the abnormal attribute to all static. This is a coarse solution and is not recommended.