BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GN0001
Barite | Level 11

Hello team,

What is the content of an index in SAS?

Is it a copy of the values of a variable we create index on or is it a pointer to a observation?

Thanks,

BlueSky

Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

@GN0001 wrote:

Hello team,

What is the content of an index in SAS?

Is it a copy of the values of a variable we create index on or is it a pointer to a observation?

Thanks,

BlueSky


Both. It contains records consisting of the index values and the observation pointers, sorted by the index values.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

@GN0001 wrote:

Hello team,

What is the content of an index in SAS?

Is it a copy of the values of a variable we create index on or is it a pointer to a observation?

Thanks,

BlueSky


Both. It contains records consisting of the index values and the observation pointers, sorted by the index values.

ChrisNZ
Tourmaline | Level 20
Note that the index values are not searched sequentially: A binary search is performed.

See here for more information about SAS indexes https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/n06cy7dznbx6gen1q9mat8de6rdq.htm

Also note that SPDE files use much more sophisticated indexes than what the default BASE engine uses.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 763 views
  • 1 like
  • 3 in conversation