Sorry Barbara,

I worded that poorly.

On the other hand, I think you may have to <grin>.

Correct me if I'm wrong, but doesn't having the main procedure return
with LR = *ON only affect files specified in the same module as the
mainline? (Assume the program isn't running in a *NEW activation
group.) Certainly, if the module with the f-spec is being used from a
service program, the main procedure returning with LR = *ON wouldn't
close the file. (again assuming ACTGRP(*NEW) isn't used).

In the OP's case, it seems the issue is files specified in a module
other than the one that contains the mainline. I'm still not usre i

Charles

On Fri, Aug 22, 2008 at 2:00 PM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:
Charles Wilt wrote:

Files referenced in a module with USROPN are only closed when you
explicitly close them, or the activation group and/or job ends.


Charles, having USROPN coded for a file doesn't affect whether it gets
implicitly closed. It only affects whether it gets implicitly opened.

If a main procedure returns with LR on, the USROPN files will get closed.

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



This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].