As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.


From sasCommunity
Jump to: navigation, search

Welcome to

A collaborative online community for SAS® users worldwide. is an ongoing global community effort—created by SAS users for SAS users. This site is a place to find answers, share technical knowledge, collaborate on ideas and connect with others in the worldwide SAS Community. Get started now by creating a UserID.

Follow Us
For daily SAS Tips, Web updates & more.

sasCommunity Tip of the Day

Given a sorted data set, adding within and between group counters can be accomplished without the use of any IF statement logic.

data x;
    input id score @@;
100 10 100 13 100 16 101 13 101 99 102 20 102 22 102 24 102 26
data x;
    set x;
    by id;
    between +;
    within  + 1 - * within;
Obs     id    score    between    within
 1     100      10        1          1
 2     100      13        1          2
 3     100      16        1          3
 4     101      13        2          1
 5     101      99        2          2
 6     103      20        3          1
 7     103      22        3          2
 8     103      24        3          3
 9     103      26        3          4

Posted with thanks to Howard Schreier for the BETWEEN group idea (in a SAS-L posting).

Submitted By Mike Zdeb

Feel free to comment on this tip.

Prior tip - Next tip -- Random Tip

Submit a Tip

Check out the Tip of the Day page for details about this effort.

What's New

New Leadership Council for the SAS Community
New Leadership Council

From the beginning, SAS has had a strong tie to its users – more than 300 people attended the first SAS® users conference in 1976.

Just as SAS software has evolved over the years, so has the SAS user community. The growth has led the SAS Global User Group Executive Board and SAS leaders to continue that evolution by creating the SAS Leadership Council.

Read More




Recent articles: :



Recent Tips Submitted by Users:



SAS discussion forum threads:

Join Get Involved Sasopedia Events User Groups
9,514 UserIds have been created on!
This number will decrease while userid cleanup is in process.
View the Web-site usage statistics and the definition of terms.