specifies the complete
path and filename or fileref for the input PC file, spreadsheet, or
delimited external file. A fileref is a SAS name that is associated
with the physical location of the output file. To assign a fileref,
use the FILENAME statement. If you specify a fileref or if the complete
path and filename does not include special characters such as the
backslash in a path, lowercase characters, or spaces, then you can
omit the quotation marks. For more information about the FILENAME
statement, see SAS Statements: Reference. For more information about
PC file formats, see SAS/ACCESS Interface to PC Files: Reference.
Restrictions:The IMPORT procedure does not support device types or
access methods for the FILENAME statement except for DISK. For example,
the IMPORT procedure does not support the TEMP device type, which
creates a temporary external file.
The IMPORT procedure can import data only if SAS supports
the data type. SAS supports numeric and character types of data but
not (for example) binary objects. If the data that you want to import
is a type that SAS does not support, the IMPORT procedure might not
be able to import it correctly. In many cases, the procedure attempts
to convert the data to the best of its ability. However, conversion
is not possible for some types.
Interactions:When you use a fileref to specify a delimited file to import, the logical record length
(LRECL) defaults to 256, unless you specify the LRECL in the FILENAME
statement. The maximum LRECL that the IMPORT procedure supports is
For delimited files, the first 20 rows are scanned
to determine the variable attributes. You can increase the number
of rows scanned using the GUESSINGROWS data source statement. All
values are read in as character strings. If a Date and Time format,
or numeric informat can be applied to the data value, the type is
declared as numeric. Otherwise, the type remains character.
Importing a Specific Delimited File Using a Fileref
Importing a Tab-Delimited File
Importing a Comma-Delimited File with a CSV Extension