The DATASETS Procedure |
Restriction: | Must appear in a MODIFY RUN group |
Featured in: | Removing All Labels and Formats in a Data Set |
ATTRIB variable list(s) attribute list(s); |
Required Arguments |
names the variables that you want to associate with the attributes. You can list the variables in any form that SAS allows.
specifies one or more attributes to assign to variable-list. Specify one or more of the following attributes in the ATTRIB statement:
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. |
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. |
Details |
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.
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.