FILE Verb

Syntax

FILE string1{,string2}{,ERR=lineref}

Description

The FILE verb defines any disk file type except a disk directory.

See also XFILE Verb.

Parameter

Description

string1

File identification information, in the same format as used by the FID() function.

string2

Key definition data for multikeyed MKEYED files, as derived from FIN(86). Information ignored for all files other than multikeyed MKEYED and C-ISAM files.

ERR=lineref

Branch to be taken if an error occurs during execution.

The FILE statement is used in an erase-redefine procedure, as shown in the examples below. The examples remove all data from the file. For additional information see the INITFILE verb.

Examples

1000 OPEN (1)"afile"
1010 LET F$=FID(1)
1020 CLOSE (1)
1030 ERASE "afile"
1040 FILE F$

For MKEYED and C-ISAM files only

1000 OPEN (1)"afile"
1010 LET F$=FID(1),G$=FIN(1)
1020 CLOSE (1)
1030 ERASE "afile"
1040 FILE F$,G$(86)

See Also

Modifying Programs to Access the Data Server