Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The FILECLOSE command closes an open file. When the file has not been opened, an error occurs.
FILECLOSE fileunit
An INTEGER
fileunit number assigned to an open file by a previous call to the FILEOPEN function or by an OUTFILE command.
You must use the LOG command with the EOF keyword, rather than FILECLOSE, to close a file that was opened with the LOG command.
Example 9-120 Program That Opens and Closes a File
Suppose you have a program called READFILE that takes a file name as its first argument. The following lines from the program open the file and then close it.
fil.unit = FILEOPEN(arg(1), read) ... (Commands to read and process data) FILECLOSE fil.unit