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



Hello Walden,

You wrote:
>I hoped I could pass them around to non-ILE
>programs as 8-byte character arrays.

Firstly, what use would they be to non-ILE programs?

Secondly, I think there is a fundamental flaw in your design.  You should
not be exposing the TS address as the magic cookie cum handle.  Your
teraspace service program should allocate a chunk of static storage (array,
user space, user index, whatever) and your new() function should store the
TS pointer in the array and return a handle that can be used by destroy()
and any other TS functions to locate the pointer in the static storage.
That way you don't expose the implementation, you don't have to stuff about
with pointer conversions, and the handle can be a data type supported by
all HLLs.

The simplest handle is an integer as an index into the array but it could
be anything you like and its internal structure can be changed as required
by the TS service program without breaking existing code.  TS exists only
for the duration of a job/process thus a handle cannot be stored externally
to the process and reused in a different process.  You could use the job ID
as part of the handle to allow you to test and enforce this requirement.

If you really must expose the 8-byte TS pointer then you will have to write
a C procedure to handle the TS functions.  That way new() can declare a
__ptr64 data type for the TS allocation and pass it back as a char(8) data
type -- I haven't tried that but I suspect it would work.  The other TS
functions would accept the char(8) and convert it to a__ptr64 and use it.

Regards,
Simon Coulter.

--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.