There is another variation on the shared object theme, and this is global shared objects. The first procedure to define an object includes the GLOBAL keyword in the definition:
DEFINE [ [ NEW [ GLOBAL ] ] SHARED ] VARIABLE cString AS CHARACTER NO-UNDO
This makes the object definition available to the entire session. The same set of objects that can be defined as NEW SHARED can also be defined as NEW GLOBAL SHARED. For example, one procedure can have this global definition:
DEFINE NEW GLOBAL SHARED VARIABLE cEverywhere AS CHARACTER NO-UNDO.
Any other procedure in the OpenEdge session that is executed after that procedure can have this definition and make use of the same variable:
DEFINE SHARED VARIABLE cEverywhere AS CHARACTER NO-UNDO.

One tricky aspect to this is the after that procedure requirement. In many applications, it is not easy to determine which of the procedures that might want to reference a value will execute first, and therefore should be the procedure that defines it. Or you might have many procedures that need to reference the value and not know which of them will execute at all in the course of a session.

ABL provides a work-around for this problem. If a procedure defines an object as NEW GLOBAL SHARED and another procedure has already registered this definition, then no error results. The AVM ignores the NEW GLOBAL part of the second definition and accepts it as a reference to the existing SHARED object. This is different from non global shared objects, where a second NEW SHARED reference causes a run-time error.

For this reason, it is common practice simply to use the NEW GLOBAL SHARED syntax in every procedure that needs to use the objects. Although this is somewhat contradictory to the way the non global shared syntax works, it is reliable behavior.