Extended Attributes
Definition
You can think of extended attributes as customized metadata for your SAS files.
Whereas common SAS attributes such as Labels for data sets, or Length and Label for
variables are predefined SAS system attributes, extended attributes are attributes that
you define yourself. They are organized into name-value pairs and are associated with
either a variable within a SAS data set or a SAS data set in general. Extended attributes
are organized into (name, value) pairs and for the BASE engine, their data is stored in a
separate SAS data file with file extension sas7bxat.
Enabling and Manipulating Extended Attributes
You can create, add, delete, update, remove, and specify options for extended attributes
using various XATTR statements in the DATASETS procedure. You can also use PROC
CONTENTS to display data set and variable extended attributes. Only the V9 engine
supports extended attributes. Under engines that do not support extended attributes, if
you copy a data set with the COPY procedure, or the COPY statement of the
DATASETS procedure, extended attributes are dropped and a warning is written to the
log. For more information about extended attributes, see “Extended Attributes” in Base
SAS Procedures Guide.
The following output shows the results of running PROC CONTENTS on a SAS data set
with extended attributes.
Extended Attributes 671

Get SAS 9.4 Language Reference, 6th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.