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.


Tip of the Day:December 2

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

data annual(keep=year q: totsales);
    set sashelp.retail(keep=sales date year);
    by year;
 
    retain q1-q4 .;
    array annual {4} q1-q4;
 
    if first.year then call missing(of annual{*});
 
    annual{qtr(date)}=sales;
 
    if last.year then do;
       totsales=sum(of q:);
       output annual;
    end;
run;

The CALL MISSING routine can be used to set all of its arguments to missing. The arguments can be numeric, character, or even array references.


Submitted By Art Carpenter



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip