SAS Component Language Dictionary |
Category: | Catalog and SAS Table |
Syntax | |
Details | |
Example |
Syntax |
rc=CONTENTS(SAS-table<,mode>); |
contains the return code for the operation:
0 | |
0 |
An error or warning condition occurred during the operation. |
is the name of the SAS table. (SAS data set options are ignored in this argument.) The name of the data set would have to include the #nnn number of the generation set. For example to view the third generation data set of WORK.ONE:
rc=contents('work.one#003');
specifies whether the information can be modified:
Details |
The CONTENTS function opens the Properties window, which enables an application user to browse or modify column names, formats, informats, and labels of a SAS table. By default, the Properties window is opened in edit mode. However, if the specified table is currently open, then you must specify B for mode.
Initially, General Properties (that is, attributes, but not column names) are listed in the Properties window. To change the value of an attribute, do the following:
Click the mouse menu button on the attribute that you want to change and then click on .
In the dialog window that appears, make the desired changes to the text.
To change a column name, do the following:
Click on the down arrow at the upper right corner of the window. The menu that appears contains information about the table, including column names. Select the column name that you want to change.
Click the mouse menu button on the column name that you want to change, and then select .
In the dialog window that appears, make the desired change to the column name.
Example |
Display the attributes for the table MYLIB.HOUSES:
if (contents('mylib.houses')) then do; _msg_=sysmsg(); ...SCL statements to handle case where contents cannot be displayed... end;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.