IB Statements/clearfile

From CometWiki

< IB Statements
Revision as of 09:24, 20 May 2009 by Badge (Talk | contribs)
Jump to: navigation, search

CLEARFILE statement

Syntax: CLEARFILE (lun)

Discussion: The CLEARFILE statement clears all data from an open Comet data file.

The lun parameter is the numeric value that is assigned to the previously opened data file. The lun may be a numeric constant, numeric variable, or a symbolic constant. Its value may be from 0 through 49.

The CLEARFILE statement does not remove the data file entry from the Comet directory (like the ERASE statement does); it just clears all of the data records from the file.

History: This feature was added to CometServe32 and CometServeNLM Version 2.59.

Example: OPEN (20) "WORKFILE",DIR="DSK" . . . CLEARFILE (20) . . . CLOSE (20)

This example shows a data file named WORKFILE,DSK being opened on lun 20. The CLEARFILE statement clears all of the data from this file. At the end of the code segment, the file is closed.

Personal tools