Previous Page | Next Page

SAS Component Language Dictionary

DESCRIBE



Fills an SCL list with items of system information about a SAS table, view, or catalog entry
Category: List

Syntax
Details
Example
See Also

Syntax

sysrc=DESCRIBE(source-name,list-id<,type>);

sysrc

contains the return code for the operation:

0

successful

[ne]0

not successful

Type: Numeric

source-name

is the name of the table, view, or catalog entry.

Type: Character

list-id

contains the identifier of an existing list to contain the control's description. An invalid list-id produces an error condition.

Type: Numeric or List

type

specifies the type of control to be described:

'CATALOG'

SAS catalog entry (This is the default.) For three- or four-level names, the default entry type is PROGRAM.

'DATA'

SAS table (This is the default for one- or two-level names.)

'VIEW'

SAS data view.

Type: Character


Details

Because DESCRIBE replaces the previous values in the list, the same list can be used repeatedly.

The items of descriptive information are placed into the list as named items, and the names of the list items are the names of the attributes described. Only the named attributes that appear in the list are filled in.

The attributes that DESCRIBE can place in an SCL list are determined by the value of type. If type is DATA or VIEW, then the items named in the list are attributes that are returned by the ATTRN and ATTRC functions. If type is CATALOG, then the items named in the list are DESC (the description of the catalog), EDESC (the extended description of the catalog entry), CRDATE (the date that the entry was created), and DATE (the date that the entry was last modified). CRDATE and DATE are SAS date values.

For catalog entries, if a numeric list item named DATE exists in the list, then DESCRIBE sets that item's values to a SAS date value. Otherwise, if DATE is a character list item, then DESCRIBE assigns a formatted date string using the MMDDYY10. format. Use ITEMTYPE to determine the type of a list item.


Example

Create an SCL list containing items named DESC and DATE. DESCRIBE fills the DESC and DATE items in the list with information about the catalog entry MYLIB.MYCAT.A.SCL.

init:
  desc_list=makenlist('L','DESC','DATE');
 /* set DATE to character list item */
  rc=setnitemc(desc_list,' ','DATE');
  rc=describe('MYLIB.MYCAT.A.SCL',desc_list,'CATALOG');
  call putlist(desc_list);
return;

The output would be similar to:

(DESC='A.SCL' DATE='03/25/2000' )[5]


See Also

ATTRC and ATTRN

Previous Page | Next Page | Top of Page