Chapter Contents

Previous

Next
SAS Data File: _getAttributes

SAS Data File: _getAttributes



Retrieves a list of attributes for the data file associated with a SAS Data File object


Syntax
Example

Syntax

CALL SEND (datafile-object-id, '_getAttributes', attributes-list);

Argument Type Description
attributes-list
N specifies the identifier of an SCL list that contains named items for the attributes you want returned. Each item in the list corresponds to a SAS Data File attribute. The attributes that this list can contain are listed for the ATTRC and ATTRN SCL functions. For more information, see SAS Component Language: Reference.


Example

This example creates an SCL list, ATTRLIST, that contains named items for the NOBS, NVARS, CRDTE (datetime stamp), LIB, LABEL, and TYPE attributes. When this list is passed to _getAttributes, the values of these attributes for SASUSER.FITNESS are inserted into the list.

attrlist=makelist();
attrlist=(insertn(attrlist,., -1,'nobs'));
attrlist=(insertn(attrlist,., -1,'nvars'));
attrlist=(insertc(attrlist,'', -1,'crdte'));
attrlist=(insertc(attrlist,'', -1,'lib'));
attrlist=(insertc(attrlist,'', -1,'label'));
attrlist=(insertc(attrlist,'', -1,'type'));
call send (dfile, '_get_attributes_',
           attrlist);

PUTLIST shows that SASUSER.FITNESS has these values for the attributes:

( NOBS=31
  NVARS=8
  CRDTE='06JUL95:16:23:03'
  LIB='SASUSER'
  LABEL='Exercise/fitness study data set'
  TYPE='DATA'
)[2639]


Chapter Contents

Previous

Next

Top of Page

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