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


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


Main Page

From sasCommunity
Revision as of 16:50, 19 November 2011 by LainieH (Talk | contribs)

Jump to: navigation, search

Welcome to sasCommunity.org

A collaborative online community for SAS® users worldwide.

sasCommunity.org 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

Two steps in one with Proc SQL – summarize and create macro variables

Wouldn't be nice to summarize the data and save the results to a macro variable in one Proc SQL step? You can by directing results from the COUNT() summary function to the INTO: keyword. From the Proc SQL code below, all male records are counted and saved to the male_cnt macro variable. While this example shows one summary function and one macro variable, you can also apply other summary functions such as AVG(), MIN(), or MAX() to create three more macro variables. Just remember to separate each summary function and macro variables by commas and maintain the variable order. You still only need to have one INTO keyword.

proc sql noprint;
    select count(sex) into :male_cnt 
    from sashelp.class
    where sex = 'M';
quit;
%put 'Number of Males = ' &male_cnt;

Sunil Gupta


Submitted By Sunil Gupta



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

NOTICE: A sasCommunity.org software upgrade is taking place November 18-20. During this time, the site may experience temporary technical difficulties.

Wiki Upgrade
Wiki Upgrade Some of you may have noticed that the appearance of sasCommunity.org has changed slightly. That is because we just upgraded to the latest version of MediaWiki 1.17. The new version is a large release with several technical bug fixes and new features. Read more about the new upgrade. Here are some highlights:
  • Collapsible left navigation categories
  • New customizations in account preferences
  • Additional editing preferences
  • RSS/Atom feeds now available for Watchlists
  • Warning notice if you leave the edit form without saving
  • Search now located in the Header on top


SAS Global Forum 2012
SAS Global Forum 2012

Registration is now open!
Don't miss your opportunity to network with thousands of SAS professionals worldwide and attend hands-on workshops, demonstrations, and more than 300 paper presentations to enhance your SAS skills.

Register for the conference now


Blogs

Recent SAS user blog entries:
 

Content

Recent sasCommunity.org articles:
 

Tips

Recent Tips Submitted by Users:
 

Forums

SAS discussion forum threads:

RSS Feeds for Blogs, Content, Tips and Forums have been temporarily disabled. Please use links above to access information.


9,514 UserIds have been created on sasCommunity.org!
This number will decrease while userid cleanup is in process.
View the Web-site usage statistics and the definition of terms.


Join sasCommunity.org Get Involved Sasopedia Events User Groups