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



Phil:

Yes, that part's easy. The crux of the question was about what can be done with 
that pointer.

The Retrieve Network Attributes (QWCRNETA) API expects a receiver variable as 
its first parm. Or more technically, the parm list is a list of addresses, and 
the first address on the list should point to the receiver variable. The second 
parm passes the length of the receiver variable. This is easy in RPG (or COBOL 
or CL or whatever).

That is, it's easy as long as the receiver variable doesn't exceed 32K. Beyond 
that length, additional code is needed to allocate sufficient memory and to 
release the memory when done with it. QWCRNETA isn't the best example because 
of the small amount of memory needed; QjoRetrieveJournalInformation, OTOH, is 
an example where the retrieved info is arbitrarily long. Neither API returns 
info into a *USRSPC as part of the documented specification. But...

I got to wondering if a QTEMP *USRSPC might not provide the needed memory 
allocation plus the cleanup at the end, as well as making the returned values 
easily available to other programs in the job without sharing memory, etc., and 
in particular whether security level 50 might bring unanticipated issues. It 
feels like a slight trend in some recent APIs from IBM to return lists into 
receiver variables rather than *USRSPCs. I was just wondering if it made any 
practical difference other than probably minimal performance or overhead stuff.

I.e., what's the likelihood of an arbitrary API acting differently depending on 
whether that first address points specifically to allocated memory or to a 
*USRSPC object? At first glance, given single-level storage, etc., it seems 
there'd be no difference (assuming proper authorities are granted, etc.). But 
that gets to a level that's beyond me. Hence, the question to the MI list.

Tom Liotta

On Thu, 30 August 2001, "Hall, Philip" wrote:

> > Q1. Should I be able to create a *USRSPC of some large size,
> > initialize the space to a value such as X'00' at creation,
> > retrieve a pointer to it and then pass the pointer to
> > QabcListAPI as if it were the address of a program variable?
> > After the API call, I could then access the list data via a
> > based variable in multiple other programs.
>
> There is an API to get the pointer to a usrpsc, using this will work at any
> seclvl

--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788
Fax  253-872-7904
http://www.400Security.com


___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/






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.