Previous Page | Next Page

The ACCESS Procedure for PC Files

ASSIGN Statement


Indicates whether SAS variable names and formats are automatically generated.
Valid: for DBF, DIF, WK1, WK3, WK4, Excel 4, Excel 5, and Excel 95 file formats under Windows operating environments
Applies to: access descriptor
Interacts with: FORMAT, RENAME, RESET, UNIQUE
Not allowed with: UPDATE
Default: NO
Alias: AN

ASSIGN =<YES|NO|Y|N>;


Details

The ASSIGN statement indicates whether SAS variable names and formats are automatically generated. Where long names must be shortened to the SAS length limit of eight characters, variable names are automatically generated.

An editing statement such as ASSIGN appears after the CREATE and database-description statements. See CREATE Statement for more information.

You can use the value NO (or N) to modify SAS variable names and formats when you create an access descriptor. Use NO (or N) when you create view descriptors that are based on this access descriptor. When creating an access descriptor, use the RENAME statement to change SAS variable names. Use the FORMAT statement to change SAS formats.

Specify a YES (or Y) value for this statement to generate unique SAS variable names from the first eight characters of the PC file column names. With YES, you can change the SAS variable names only in the access descriptor. The SAS variable names that are saved in an access descriptor are always used when view descriptors are created from the access descriptor. You cannot change the variable names in the view descriptors.

SAS variable names are generated as follows:

When the SAS/ACCESS interface encounters the next CREATE statement to create an access descriptor, the ASSIGN statement is reset to the default NO value.

Previous Page | Next Page | Top of Page