× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

Yes, that would work.

When the first job ends, any attempt to access memoryP by job2 would
probably cause an MCH error.

The user space *doesn't* know that it's a pointer - as you pointed out, it's
up to the programs that reference that data to specify that it's a pointer.
However, the difference between a user space and a data area/data queue etc.
is that you *can* *technically* store a pointer inside a user space, because
the user space can also store the tags etc.

Rory

On Thu, Jun 19, 2008 at 11:29 AM, David Gibbs <david@xxxxxxxxxxxx> wrote:

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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.