Chapter Contents

Previous

Next
ASSIGN

ASSIGN



Indicates whether SAS variable names and formats are automatically generated.

Optional statement
Applies to: access descriptor
Interacts with: FORMAT, RENAME, RESET, UNIQUE
Not allowed with: UPDATE
Default: NO


Syntax
Details

Syntax

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 8 characters, variable names are automatically generated.

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

The value NO (or N) enables you to modify SAS variable names and formats when you create an access descriptor and when you create view descriptors that are based on this access descriptor. During an access descriptor's creation, you use the RENAME statement to change SAS variable names; you 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 8 characters of the PC file column names, according to the rules listed below. 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 them in the view descriptors.

Default SAS variable names are generated according to these rules:

If you specify YES for this statement, the SAS System automatically resolves any duplicate variable names. However, if you specify YES, you cannot specify the RENAME, FORMAT, RESET, or UNIQUE statements when you create view descriptors that are based on the access descriptor. When you are updating an access descriptor, you cannot specify the ASSIGN statement.

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.

AN is the alias for the ASSIGN statement.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.