CLOSE Statement Details Syntax CLOSE [[#]filenumber[,[#] filenumber]...] The filenumber is the number under which the file was opened. A CLOSE statement with no arguments closes all open files and devices. The association of a file with a file number ends when a CLOSE statement is executed. You may then reopen the file using the same or a different file number. Once you close a file, you may use that file's number for any unopened file. A CLOSE for a file or device that was opened for sequential output writes the final buffer of output to that file or device. CLOSE releases all buffer space associated with the closed file or files. The CLEAR, END, RESET, RUN, and SYSTEM statements close all files automatically.