Académique Documents
Professionnel Documents
Culture Documents
info@sastechies.com
http://www.sastechies.com
Using SAS functions, you SAS function:
can function-name(argument-1<
,argument-n>); where
◦ convert data from one argument can be
data type to another.
◦ calculate sample statistics ◦ variables mean(x,y,z)
◦ create SAS date values ◦ constants mean(502,612,498)
◦ convert ZIP codes to state ◦ expressions
mean(37*2,192/5,mean(22,34,56))
postal codes
◦ Even if the function does not
◦ round values require arguments, the function
◦ generate random name must still be followed by
numbers parentheses, for example:
function-name().
◦ extract a portion of a
character value
data hrd.newtemp;
6 SiteCode=site||department;
7 run;
TRIM TRIM(argument)
LEFT(argument) NewAddress=trim(‘Jersey ‘)
NewAddress=trim(left((‘ Jersey ‘) )
INDEX INDEX(source,excerpt)
UPCASE UPCASE(argument)
UPCASE(‘sharad’)
LOWCASE LOWCASE(argument)
LOWCASE(‘ShaRAD’)