Previous Page | Next Page

SAS Component Language Dictionary

CONTENTS



Displays the attributes of a SAS table
Category: Catalog and SAS Table

Syntax
Details
Example

Syntax

rc=CONTENTS(SAS-table<,mode>);

rc

contains the return code for the operation:

0

The attributes of the specified table were displayed.

[ne]0

An error or warning condition occurred during the operation.

Type: Numeric

SAS-table

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');

Type: Character

mode

specifies whether the information can be modified:

'B'

displays the Properties window for browsing only.

'E'

allows information in the Properties window to be modified. (This is the default.) If member-level locking is not available, then the Properties window is displayed in BROWSE mode instead.

Note:   Any value that begins with a character other than B or b also selects EDIT mode.  [cautionend]

Type: Character


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:

  1. Click the mouse menu button on the attribute that you want to change and then click on Modify.

  2. In the dialog window that appears, make the desired changes to the text.

To change a column name, do the following:

  1. 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.

  2. Click the mouse menu button on the column name that you want to change, and then select Modify.

  3. 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;

Previous Page | Next Page | Top of Page