Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Global Variables in VISUAL COBOL

$
0
0

You can store the object in the Base class by defining it as an external item in both Base class and in Layer

example:

01 anInstance    object reference external.

This data item will then be referring to the same memory storage and will be shared between the two.

The object will only be valid on the second call if it has not been disposed of first.

So if your called Layer and it created the instance of the COM class and stored it in anInstance then it would automatically still be available in Base even if Layer has been canceled.

You could also just pass the object as a parameter back and forth between the Base and the Layer and store it as a non-external item in the base class.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>