|
Bruce Vining wrote:
A *USRSPC can store a pointer, but a *DTAARA, *DTAQ, or database file
cannot. The pointer will not be considered to be valid when you try
to use it later.
Ok, I'm certainly learning stuff today.
So, given the following program in one job ...
----------
Dsomefield S 10A inz('ABCDEFG')
DmemoryP S * based(userSpaceP)
DuserSpaceP S *
/free
ibmQUSPTRUS(qualifiedUsName:userSpaceP);
memoryP = %addr(somefield);
// do other stuff
/end-free
----------
... and a this program in another job ...
----------
Dsomefield S 10A based(memoryP)
DmemoryP S * based(userSpaceP)
DuserSpaceP S *
/free
ibmQUSPTRUS(qualifiedUsName:userSpaceP);
if somefield = 'ABCDEFG';
// do something to indicate the memory is the same
endif;
/end-free
----------
Would work???
What happens if the first job ends?
How does the user space know that the information stored in it is a
pointer?
Thanks!
david
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.