|
CRTRPGMOD(CUSTMOD)
CRTRPGMOD(MAINMOD)
CRTPGM(MAINMOD CUSTMOD) ACTGRP(*NONE)
This is what I have always done. Does this method of building not close
the files opened in CUSTMOD when MAINMOD exits (my special customer name
procedure is in CUSTMOD coded as a NOMAIN procedure - main program is in
MAINMOD which sets on LR when done)?
The files opened in CUSTMOD will be closed automatically when the
activation group ends. If the program created from MAINMOD and
CUSTMOD runs in the default activation group, the files will only be
closed when the job ends.
The solution: as stated by someone else, create the program to run in
either a named or a *NEW activation group. When the first program of
the activation group ends, the activation group cleans up, and the
files will be closed.
I recommend reading the ILE concepts manual. Cover to cover. When
you're done, read it again. This is not facetious advice; I recommend
it to anyone who wants to do ILE programming.
--
Paul Cunnane
Mattel Interactive
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
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.