by RGZbrog » Tue Nov 23, 2010 12:04 am
In the very early days of Natural, global variables (often called + variables, due to the requisite prefix) often caused maintenance nightmares, as they were difficult to control, having few restrictions placed upon them. The Global Data Area (GDA) was created to bring order to the chaos by replacing global variables. But users complained to Software AG that some features of global variables were not available to the GDA, so Application Independent Variables (AIVs) were introduced, effectively reinstating global variables.
There are two big differences between the GDA and AIVs:
. the GDA must be defined as an external module, while AIVs must be defined in-stream
. the GDA is not available to subprograms (except as parameters), while AIVs are available to subprograms
Talk to your tech lead about the (very) few situations where AIVs should be used/allowed and how they should be controlled. This is an advanced topic/technique.