Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

How to index datasets

Posts: 73

How to index datasets

Hello MO/OR community,

I intend to compress data set and while examining PROC CONTENTS, I found following additional information:


Data Set Type

Indexes 0

Compressed NO

Sorted NO

If I were to modify Compressed to YES, how should I proceed?

In general, what are options for Protection, Data Set Type, Indexes, Sorted and how to modify these? Are there some macros to address this? Is it user-level grant


Dhanashree Gadkari

Posts: 72

Re: How to index datasets


The options for protection can be found in the passwords section of my paper:  PROC DATASETS; the Swiss Army Knife of SAS Procedures, http://support.sas.com/resources/papers/proceedings11/274-2011.pdf .

Data set type is usually DATA, VIEW, or INDEX.  However, I understand that there are additional data types associated with PROC CORR, but I have never used it and cannot comment on it further.

As far as Indexes go, see my paper:  The Basics of Using SAS Indexes, http://www2.sas.com/proceedings/sugi30/247-30.pdf to get this information for free.  Or, if you are really interested, consider my SAS Press book:  The Complete Guide to SAS Indexes, https://support.sas.com/publishing/authors/raithel.html which will cost you a dollar or "two".

Finally, SORTED is set by SAS when the data are sorted or when you assert a sort on the data set via PROC DATASETS.  See first paper mentioned for that later point.

Best of luck in all your SAS endeavors!


(aka Michael A. Raithel)

Best of luck in all your SAS endeavors!

(aka Michael A. Raithel)
Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0
Posts: 73

Re: How to index datasets

Michael Raithel,

Those reads provided answers to my attempt of bridging between SAS and SQL. Very well then!

Your wishes are much needed this moment.


Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation