IMPORT Procedure

GETNAMES Statement

Specifies whether the IMPORT procedure generates SAS variable names from the data values in the first record in the input file.
Interactions: If the column names in the first record in the input file are not valid SAS names, then the IMPORT procedure uses default variable names.

The GETNAMES statement is valid only for delimited files.

Importing a Delimited File

Importing a Specific Delimited File Using a Fileref

Importing a Comma-Delimited File with a CSV Extension

Syntax

GETNAMES=YES | NO;

Required Argument

YES | NO
Specify whether SAS variable names should be generated from the first record in the input file.
Note: If a data value in the first record in the input file is read and it contains special characters that are not valid in a SAS name, such as a blank, then SAS converts the character to an underscore. For example, the column name Occupancy Code would become the SAS variable name Occupancy_Code.
Default:YES