129
FILE Directive
Create New File from File Descriptor
Format
FILE file_info[,ERR=stmtref]
Where:
file_info
Contents provide the internal file description for the file to create.
String expression.
stmtref
Program line number or label to transfer control to.
Description
Use the FILE directive to define a file based on the contents returned by the FID( ) or
FIB( ) functions. These functions return character strings with the file type, size, and
format.
Warning: The FILE directive will not recreate an embedded data dictionary. When you
have an embedded data dictionary, use a PURGE or REFILE directive instead, to clear
the data from an existing file and preserve the dictionary.
Note: The format of the FID( ) value will depend on the current emulation mode you
are using for ProvideX. To avoid potential problems when running in emulation
modes, use the value returned from the FIB( ) function instead of the FID( ) function.
Note: This directive is not supported by WindX. When you need to create files on a
WindX PC, encapsulate the command in an EXECUTE "[WDX]..." directive.
See Also
Creating, Deleting, and Renaming Data Files, User's Guide
Examples
0010
OPEN (2)"PRNTFL"
0020
F$=FID(2)
0030
CLOSE (2)
0040
ERASE "PRNTFL"
0050
FILE F$
0060
OPEN (2)F$(25,60)