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.
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.
sasCommunity Tip of the Day
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;
Submitted By Sunil Gupta
Feel free to comment on this tip.
Check out the Tip of the Day page for details about this effort.
|SAS Global Forum 2012: Call for Papers is now open!|
Paper presentations are an invaluable part of what has made SAS Global Forum a focal point of knowledge and learning within the SAS community for more than three decades. The deadline for contributed submission abstracts and working drafts is Monday, November 14.
|Join sasCommunity.org||Get Involved||Sasopedia||Events||User Groups|