Close data file

Command groupFlag affectedReversibleExecute on clientPlatform(s)
Data filesYESNONOAll

Syntax

Close data file
 
internal-name 
(leave empty to close all)

Description

This command closes the open data file with the specified internal name, or closes all the open data files if no name is specified. It sets the flag if at least one data file is closed. It clears the flag and does nothing (that is, does not generate a runtime error) if the specified internal name does not correspond to an open data file.

Note that data files have a notation property $allowclose, which when set to kFalse, prevents Close data file, the data file notation, and the Data File Browser from closing the file.

Example

# check the $allowclose property of myDataFile

If
 
$root.$datas
.
myDataFile
.
$allowclose

  
Close data file
 
myDataFile

End If