Was willst du mit dem Inhalt einer lokalen Variable außerhalb ihrer Prozedur?

Storage of Definitions

Local definitions use automatic storage. Automatic storage is storage that exists only for the duration of the call to the procedure. Variables in automatic storage do not save their values across calls.

Global definitions, on the other hand, use static storage. Static storage is storage that has a constant location in memory for all calls of a program or procedure. It keeps its value across calls.

Specify the STATIC keyword to indicate that a local field definition use static storage, in which case it will keep its value on each call to the procedure. If the keyword STATIC is specified, the item will be initialized at module initialization time. [...]

Quelle