If you do not explicitly close a file, Rexx closes the file for you at the end of the procedure (that is, the end of the CMD file in which the files were opened). If your procedure is called as an external procedure by another Rexx program, Rexx closes the files before returning to the caller. In any case, it is recommended to explicitly close files when you are finished with them.