Chapter Contents

Previous

Next
ISINDEX

ISINDEX



Returns the type of index for a SAS table column

Category: SAS Table


Syntax
Details
Example
See Also

Syntax

index=ISINDEX(table-id,col-name);

index
contains the type of the index:

(blank)
No index has been created for the specified column.

BOTH
The column is a member of both simple and composite indexes.

COMP
The column is a member of a composite index.

REG
The column is a regular (simple) index.

Type: Character

table-id
is the identifier that was assigned when the table was opened. If table-id is invalid, the program halts.

Type: Numeric

col-name
is the name of a column in the SAS table. If col-name is not a column in the table, then ISINDEX returns a blank value.

Type: Character


Details

An index is an auxiliary data structure used to assist in the location (that is, selection) of rows that are specified by the value of a column. An index is called a simple index if it contains the value of only one column. A composite index merges the values for more than one column to form a single value. A given SAS table can have multiple simple indexes, composite indexes, or any combination of these.

You can create indexes using


Example

Return the type of index for the FNAME column in the SAS table WORK.DATAONE:

dsid=open('work.dataone','i');
ixtype=isindex(dsid,'fname');

See Also

CONTENTS

ICREATE

IDELETE

IOPTION

IVARLIST


Chapter Contents

Previous

Next

Top of Page

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