|
Thanks for all your help, Scott...Have a Happy New Year! Eric ----- Original Message ----- From: "Scott Klement" <rpg400-l@xxxxxxxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: Thursday, December 29, 2005 4:18 PM Subject: Re: Getting error - Tried to refer to all or part of an object that no longer exists. > > > > The programs under running under the MAPICS system which runs under the > > DFTACTGRP. I just changed all my programs to run under QILE and everything > > is now running fine. Did this possibly happen because of that activation > > group might have been conflicting with *CALLER? > > *CALLER isn't an activation group, it means "use whatever activation group > my caller was using" Say you have ProgramA built with ACTGRP(QILE) and > ProgramB built with ACTGRP(*CALLER). If ProgramA calls ProgramB, then > ProgramB will run in QILE as well. > > On the other hand, if ProgramC is compiled with DFTACTGRP(*YES) and calls > ProgramB, ProgramB will run in the default activation group, since this > time it's called is ProgramC, and that's what ProgramC used. > > (Using this method, it's possible to have many copies of ProgramB all > in memory at once, if it's called from a different activation group each > time!) > > In your case, I'm guessing you had an ILE service program built with > ACTGRP(*CALLER) that's called from the default activation group. The > problem with that is that the RCLRSC command doesn't understand service > programs, and doesn't expect them to be in the default activation group, > so when it cleans up everything in that actgrp, it closes the open files, > unloads the *PGM objects, but doesn't unload the service program or reset > it's attributes because RCLRSC is designed for OPM programs and knows > nothing about service programs. So the service program remains in memory, > and it remembers where the other programs and files were in memory and > tries to access them next time it's called, but fails because they were > unloaded. > > On the other hand, you said that there wasn't a RCLRSC anywhere in the > job, so maybe it's something else. I'm sure there are other ways to > create this error, but they're not coming to mind at the moment. > > I've always found that this sort of thing confuses the heck out of people > -- and if you're one of these people, I recommend the following very > simple solution: Never run ILE programs in the default activation group. > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.