Close

Close is used to free the [F] classes associated with tables and to free the cursors opened on the tables.

Syntax

Close Local File CLASS_LIST
Close File CLASS_LIST
* `CLASS_LIST` is a list of table classes separated by commas. The corresponding tables must be opened.

Examples

# Close all tables
Close Local File
# Close CUSTOMER [CUS] and ITEM [ITM] tables
Close Local File [CUS], [ITM]

Description and comments

  • The instruction Close File, where Local is omitted, is used to close the tables opened by File without Local clause. These syntaxes are deprecated and should no longer be used. Only Local File declaration and Local Close should be done.
  • A new instruction called LogicClose can also be used to close the table in an optimized manner. The buffer is cleaned but not freed.
  • Close Local File without argument closes all the tables opened by a Local File command.
  • Default lists of tables are updated by Close Local File.
  • The Close Local File instruction is done within a transaction, and takes effect only when the transaction is ended by Commit or Rollback.

Errors

Error codeDescription
7Abbreviation not found.

See also

File, Local, Trbegin, Commit, Rollback.