Monday, June 22, 2009

MOD function

MOD (dividend-expression, divisor-expression)

Returns the remainder from the division of dividend-expression by divisor-expression.

StatementsResults
a=mod(10,3);
1
a=mod(.35,-.1);
0.05

Sample program: (select certain observations from a dataset)

data temp;
       set temp;
       if mod(_N_,3)=0;
run;

No comments: