CLOSESEQ filevar [ON ERROR statements]
|filevar||A file variable name used to refer to the file in Caché MVBasic. This filevar is obtained from OPENSEQ.|
The CLOSESEQ statement is used to close a file that has been opened for sequential access using OPENSEQ. A file opened for sequential access is exclusively held by the process that opened it. Issuing a CLOSESEQ allows that file to be accessed by other processes.
You can use the STATUS function to determine the status of the close operation, as follows: 0=close successful; -1=close failed either because file variable not defined or file has already been closed.
You can optionally specify an ON ERROR clause. If file close fails, the ON ERROR clause is executed. This may occur if the file is already closed.