Caché MultiValue Basic Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   

Closes a MultiValue file.
CLOSE filevar [ON ERROR statements]
filevar A file variable name used to refer to a MultiValue file. This filevar is supplied by the OPEN statement.
The CLOSE statement is used to close a MultiValue file. It takes the file identifier filevar, defined by the OPEN statement.
If multiple OPEN statements have been issued for the same MultiValue file:
You can optionally specify an ON ERROR clause. If file close fails, the ON ERROR clause is executed. This may occur if filevar does not refer to an existing file, or if the filevar file has already been closed. The statements argument can be the NULL placeholder keyword, a single statement, or a block of statements terminated by the END keyword. A block of statements has specific line break requirements: each statement must be on its own line; there must be a line break between the ON ERROR keyword and the first line.
Alternatively, you can use the STATUS function to determine the status of the file close operation, as follows: 0=success; -1=file does not exist or has already been closed.
See Also

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA