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,

Can someone explain about tag sort? Different definitions in search so I am not sure what exactly it is doing.

Thanks,

blueblue

Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

What's hard to understand here:

 

TAGSORT

stores only the BY variables and the observation numbers in temporary files. The BY variables and the observation numbers are called tags. At the completion of the sorting process, PROC SORT uses the tags to retrieve records from the input data set in sorted order.

Note: The utility file created is much smaller than it would be if the TAGSORT option were not specified.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

What's hard to understand here:

 

TAGSORT

stores only the BY variables and the observation numbers in temporary files. The BY variables and the observation numbers are called tags. At the completion of the sorting process, PROC SORT uses the tags to retrieve records from the input data set in sorted order.

Note: The utility file created is much smaller than it would be if the TAGSORT option were not specified.
ChrisNZ
Tourmaline | Level 20

This option tells SAS to only read the BY variables when sorting.

The other variables are added as a second step.

Pros: Small utility file as few variables are moved around

Cons: Fetching the other variables when the sort is complete can take a long time 

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 2229 views
  • 2 likes
  • 3 in conversation