LENGTH: returns the length of an argument not counting the trailing blanks.(missing values have a length of 1)Ex:
a=my cat; x=LENGTH(a); Result: x=6
SUBSTR: SUBSTR(arg,position,n) extracts a substring from an argument starting at position for n characters or until end if no n. Ex:
data dsn; A=(916)734-6241; X=SUBSTR(a,2,3); RESULT: x=916 ; run;
TRIM: removes trailing blanks from character expression.
Ex: a=my ; b=cat;X= TRIM(a)(b); RESULT: x=mycat.
SUM: sum of non missing values.Ex: x=Sum(3,5,1); result: x=9.0
INT: Returns the integer portion of the argument.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!