|
Joe Pluta wrote: > > Are files opened by NOMAIN procedures automatically closed when the > activation group ends? My normal design is to code my driver programs with > ACTGRP(*NEW) and any called utility programs with ACTGRP(*CALLER). If I > call a NOMAIN procedure that opens a file, can I assume it will get closed > when my driver program ends? > > It seems to work this way, but I thought I'd doublecheck. Joe, the file will get closed when the activation group ends. Files opened by a NOMAIN module behave the same as files opened by a non-NOMAIN module that ends with LR off. (From the system's point of view, one RPG module or procedure is the same as another.) I think, but I'm not sure, that when job-scoped commitment control is involved, the file would be logically closed for RPG, but would actually stay open from a WRKJOB point of view until the changes were committed. Barbara
As an Amazon Associate we earn from qualifying purchases.
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.