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.

Tips:SUM Statement and the Implied SUM Function

From sasCommunity
Jump to: navigation, search

The SUM statement uses an implied SUM function. The SUM statement:

cnt + expression;

has the implied syntax of:

cnt = sum(cnt, expression);

Thus the following will count the observations, even though the summation variable, CNT, has been initialized to missing.

 data new;
    set sashelp.class;
    if _n_=1 then cnt=.;

Submitted by Art Carpenter. Contact me at my Discussion Page.