| Directives |
|
| Format | CLOSE
{(*) | (chan)}[,(chan)...[,ERR=stmtref])]
|
||||||||||
| Description | Use
the CLOSE directive to close a given
logical file number. The memory used for buffers and
control information is returned to the system. Once
closed, the file (channel) number can be reused for a different file. |
||||||||||
| *Note* | A CLOSE directive will delete a Memory file. See *MEMORY* Create & Use Memory File. When you CLOSE (chan), ProvideX returns all memory that was occupied by the Memory file to the system. | ||||||||||
| The ERR= branch will be taken should an error occur during the close. If the application tries to close an unopened file, an error will only be generated if an ERR= branch is provided. If an ERR= branch is not provided, the close is assumed to have occurred previously and no error is generated. | |||||||||||
| *Note* | When executed within an object (in Object Oriented Programming), CLOSE (*) will close any standard local files as well as files owned by the object. | ||||||||||
| See Also | OPEN
Open a File for Processing BEGIN Reset Files and Variables START Restart ProvideX 'WK' System Parameter |
||||||||||
| Examples | The
following will OPEN channel 30, print to it and then
close it
Assuming the following logic...
Either of the two statements below will close channels 63, 5 and 7. The second statement closes all other open local channels as well.
|
||||||||||