Charles Wilt wrote:
...
I worded that poorly.
On the other hand, I think you may have to <grin>.
Ya, I should have said "the main procedure of the module", rather than 
just "the main procedure".  I think the term "main procedure" is easily 
confused with "program entry procedure".  I guess "cycle procedure" 
would have been a better term than "main procedure" for the non-P-spec 
procedure in RPG modules.  Darn hindsight.
What I should have said was: Any RPG module that doesn't have "NOMAIN" 
has its own main procedure, its own RPG cycle, and its own LR.  Within a 
module, if that module's main procedure returns with LR on, the files 
defined in that module will be closed.
In V6R1 this changes in two possible ways.  1) A module can be defined 
to have a non-cycle main procedure, that can only be a program-entry 
procedure (MAIN keyword).  2) A procedure can have its own local files; 
even if it's a cycle module, the local files have their own rules about 
when they get closed, nothing to do with LR: automatic files get closed 
when the procedure returns, and static files never get closed.
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.