noglobaldefine

Global Defined Preprocessors are not allowed

The rule “noglobaldefine” presents a warning when it encounters an uncommented string “&GLOB”. This practice, while necessary in certain limited cases, encourages bad practices and makes code very difficult to maintain.

The Risk:
As a general rule, the average programmer cannot explain the difference between &GLOBAL-DEFINE and &SCOPED-DEFINE. As a result, they tend to use Globals much more than they should. Using a globally defined preprocessor at the top of a program is the same as a scoped defined preprocessor in the same location. Using it buried in an include (where it is intended to be used) makes it very difficult to view its impact.

How to solve this:
Change it to a &SCOPED-DEFINE if at all possible, move it to the parent file if necessary. Consider all other options prior to using it, then if you must use it for your circumstance…

How to suppress these warnings:
You can put the directive {&_proparse_prolint-nowarn(noglobaldefine)} directly before the definition of the preprocessor. See also: suppress warnings.