Chapter Contents

Previous

Next
Data Set Model: _getDatasetAttributes

Data Set Model: _getDatasetAttributes



Returns the attributes for the table


Syntax
Data Set Attribute Items
Details
Example

Syntax

CALL SEND (object-id, '_getDatasetAttributes', list);

Argument Type Description
list
N specifies the identifier of an SCL list to contain the attributes

Data Set Attribute Items
List item Type Description
'NAME' C the name of the open table, if any
'MEMBER_TYPE' C the member type for the table, for example, DATA or VIEW
'ENGINE' C the name of the engine used for the table
'CREATE_DATE' N the creation date of the table as a datetime value
'MODIFY_DATE' N the last modified date of the table as a datetime value
'PROTECTION' C the level of password protection on the table: READ, WRITE, or ALTER
'TYPE' C the type for the displayed table
'OPENMODE' C the open mode for the table: EDIT or BROWSE
'LOCK_LEVEL' C the locking level for the table: RECORD or MEMBER
'LABEL' C the label for the table
'NUMBER_OF_ROWS' N the number of logical rows in the table, if known (those not marked for deletion). It returns -1 if unknown.
'NUMBER_OF_COLUMNS' N the number of columns in the table
'INDEXES' N the index status of the table:


1 the table is indexed


0 the table is not indexed
'NUMBER_OF_DELETED_ROWS' N the number of deleted rows in the table
'COMPRESSED' C the type of compression used for the table
'SORTED' N the sort status of the table:


1 the table is sorted


0 the table is not sorted
'COLUMN_LIST' N the identifier of an SCL list that contains character items for each column in the table
'WHERE_LIST' N the identifier of an SCL list that contains character items for any currently applied where clause
'OPTION_LIST' N the identifier of an SCL list that contains character items for the following data set model options: BRONLY, NOADD, and NODELETE
'LOCKED_ROW' N the relative row number of the row that is locked. If no row is locked, a value of -1 is returned.


Details

To query all table attributes, the list should be empty. To query specific attributes, the list should contain named items for attributes of interest. See Data Set Model Attributes for details on specific attributes.

The _getDatasetAttributes method sets SYSRC for error, note, and warning conditions.


Example

In the following example, the Data Set Model class is being used as a stand-alone model, that is, the model class is not being used with a data form or data table object.

This example assumes you have created a FRAME entry with a push button object named BUTTON1:

 Note about code
INIT:
   datcl=loadclass('sashelp.fsp.datast_m.class');
   datid=instance(datcl);
 Note about code
   call send(datid, '_setDataset',
            'sasuser.class');
return;
 Note about code
BUTTON1:
   gattr=makelist();
   call send(datid, '_getDatasetAttributes',
             gattr);
   call putlist(gattr, 'Data Set Attributes=',0);
 Note about code
   rc=clearlist(gattr);
   gattr=setnitemc(gattr, ' ', 'engine');
   call send(datid, '_getDatasetAttributes',
             gattr);
   call putlist(gattr, 'Engine Information=',
                0);
   gattr=dellist(gattr);
return;
 Note about code
TERM:
   call send(datid,'_term');
 return;


Chapter Contents

Previous

Next

Top of Page

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