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



Scott,

It was really meant tongue-in-cheek. The shampoo analogy, which I imagined was a widely known programming conundrum, goes:

Lather <--
| |
V |
Rinse |
| |
V |
Repeat--->

The compile options of Dftactgrp(*no) actgrp(*caller) could, also, be a conundrum in that, if the caller is really running from the default activation group, then.... Oh, never mind. I'll just try to remember to put a smiley face .-) on it next time.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Monday, October 13, 2008 11:41 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: override scope in a procedure

Loop?? I really don't understand what you're saying... How could an
activation group ever create a loop?

Indeed, I completely disagree with you about IBM putting in error
checks. The problem is, IBM does *not* put in those types of checks.
That's the whole problem with RCLRSC against an ILE service program. It
doesn't check for stupidity. RCLRSC closes the files, because it
understands open files -- but it doesn't unload the service program
because it has no notion of service programs. The service programs have
no way to detect that RCLRSC freed up the memory they were using to
interface with the database, and they simply start overwriting random
memory until they get lucky enough to crash.

Had IBM put in error checking, they would've prevented you from running
ILE code in the dftactgrp via *CALLER so that this sort of breakage
wouldn't happen. (Of course, they can't make that change now, because
too many people are actually USING this mistake as a "feature".)

But, anyway, I have no idea what you mean by a "loop" or the shampoo
analogy. Can you explain why you think running ILE in *CALLER from an
OPM program would cause a loop?

Jerry Adams wrote:
Yeah, I know that it's best not to use the default activation group,
and that bad things can happen. It's just that Dftactgrp(*no)
actgrp(*caller), when the caller is in the default activation group,
seemed like a loop. Sort of like the instructions on shampoo
bottles: Lather, rinse, repeat.

I guess IBM put in "That's the dumbest thing I've seen today" error
checks for these kinds of things.

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

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.