Substring function with Index (separating a full name into first and last names):
DATA FIRST_LAST_NAME;
SET FULL_NAMES;
FORMAT FIRST_NAME $15. LAST_NAME $15.;
FIRST_NAME=SUBSTR(FULL_NAME,1,INDEX(FULL_NAME," "));
LAST_NAME=SUBSTR(FULL_NAME,INDEX(FULL_NAME," "));
RUN;
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment