× 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 Jerry,

You wrote:
>But this results in "MCH3402 - Tried to refer to all or part of an object that
>no longer exists"

In which activation group is your main program running?  Since the service
program is running in a named activation group you can always reclaim it (as 
long
as it is not in use).  The main program that invokes the service program
functions is also running in an activation group and the program leaves pointers
in that activation group which reference objects in the named activation group 
--
thus the MCH3402 exception when the service program activation group is
destroyed.

If your main program runs in the default activation group** then the pointers
cannot be reset until you end the job.  If it is another named activation group
(e.g., QILE) then you would have to reclaim that also.  The easiest solution is
to make your main program run in a *NEW activation group.

You could also write a new function in your service program -- reloadXrefCache()
-- which causes the service program to reload its cache thus avoiding any nasty
issues with activation groups.  You will probably find this path much more
flexible and useful in the long run.

You could also use a common cache-valid flag field EXPORTED from the service
program and IMPORTED into the maintenance program.  The maintenance program 
would
set the flag to invalidate the cache and the next access to the service program
would cause it to rebuild the cache.  I find this approach rather ugly and would
avoid it in preference to the reloadXrefCache() function.

**Normally it is not possible to run in the default activation group and use
service program procedures but a little creative effort can make this happen --
DFTACTGRP(*NO) ACTGRP(*CALLER) will do it if called from a program running in 
the
default activation group.  Note that this is a dumb thing to do.

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