BookmarkSubscribeRSS Feed
JacobE
Calcite | Level 5

Hi....question about SAS indexes.

I accidentally deleted a SAS index file when I wrote over a data set  by having the data set in the DATA and SET statements.

To replace the one I deleted, I want to create a new index file with the same characteristics as the other index files in the same directory.

But when I do a PROC CONTENTS on the SAS data sets in that directory (code below), the results indicate that the number of indexes is 0 and there are no variables listed as key variables for every SAS data set, even though the index files exists.

proc contents data=mylibrary._all_ details;

run;

My question is, how can a SAS data set have an index file, and yet no indexes?  No key variables.

Are these index files then pretty much useless?

Thanks!

Jacob

1 REPLY 1
RichardinOz
Quartz | Level 8

What code did you use to re-create the index?  If you used some method such as restore from a backup or upload from another platorm the SAS data set will not recognise the index.  Use Proc Datasets.

Richard

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 403 views
  • 0 likes
  • 2 in conversation