Files should be closed explicitly when NOMAIN is specified on the Control specification.
10
Cause . . . . . : When the NOMAIN keyword is specified on the Control specification, files do not get closed automatically. CLOSE operations are recommended for all files that may be opened during module initialization, or by procedures in the module.
Recovery . . . : One solution is to create a procedure to be called at the end of the application that contains a CLOSE *ALL operation. Another solution is to close files in the same procedure that opens them.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.