Associates
a format, informat, or label with variables in the
SAS data set specified in the MODIFY statement.
ATTRIB variable list(s) attribute
list(s);
|
- variable
list
-
names the variables that you want to associate with the
attributes. You can list the variables in any form that SAS allows.
-
attribute-list
-
specifies one or more attributes to assign
to variable-list. Specify one or more of the
following attributes in the ATTRIB statement:
-
FORMAT=format
-
associates a format with variables in variable-list.
Tip: |
The format can be either a standard SAS format or a
format that is defined with the FORMAT procedure. |
-
INFORMAT=informat
-
associates an informat with variables in variable-list.
Tip: |
The informat can be either a standard SAS informat or
an informat that is defined with the FORMAT procedure. |
-
LABEL='label'
-
associates a label with variables in the
variable-list.
Within the DATASETS procedure, the ATTRIB statement must be used in
a MODIFY RUN group and can use only the FORMAT, INFORMAT, and LABEL options.
The ATTRIB statement is the simplest way to remove or change all variable
labels, formats, or informats in a data set using the keyword _ALL_. For an
example, see Removing All Labels and Formats in a Data Set.
Note: For more information about shortcut methods for specifying variables,
see Shortcuts for Specifying Lists of Variable Names. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
If you are not deleting or changing all attributes, it is easier to
use the following statements, LABEL Statement, FORMAT Statement, and
INFORMAT Statement.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.