Oracle9i OLAP Services Developer's Guide to the OLAP DML Release 1 (9.0.1) Part Number A86720-01 |
|
Reading Data from Files, 4 of 9
The FILEOPEN function opens a file and returns an integer that uniquely identifies that file. This identifier is known as a fileunit. Once you have opened a file and obtained a fileunit, all subsequent calls to data-reading commands and file I/O commands for that file reference the fileunit instead of the file name.
A file identifier is a character string that specifies a file stored on disk. The file identifier always includes the file name. In addition, other information might be required to specify the full path location of the file. The format of file identifiers is different on different operating systems.
In the Windows environment, the format in which you specify a file name depends on where the file is located:
DOS file name format is as follows.
[d:] [\][path\] filename[.ext]
The d argument designates a disk drive.
The path argument is a path of directory names separated by backslash (\
) characters.
The filename argument is the name of the file.
The ext argument is a 1- to 3-character extension preceded by a period.
UNC file name format is as follows
\\host\share\[path\] filename[.ext]
The host argument designates the host system.
The share keyword designates a shared area on the host.
The path argument is a path of directory names separated by backslash (\
) characters.
The filename argument is the name of the file.
The ext argument is a 1- to 3-character extension preceded by a period.
When specifying file identifiers in OLAP DML commands, it is good practice to always enclose them in single quotation marks. This will prevent parsing errors in cases where file name components are also OLAP DML object names or reserved words.
The backslash character (\
) in file identifiers is of special importance. The backslash is interpreted as an escape character. Therefore, when specifying a file identifier as a text expression, you must use double backslashes to designate single backslashes.
In most cases, when parsing file names:
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|