

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


To get the Length of the variable VAR VARIABLE1 VARIABLE2; RUN; LEN(Variable)
Variable1||Variable To remove extraneous spaces PROC PRINT DATA NEW (OBS = 10); STRIP(Variable) RUN; COMPRESS(var1||var2)
To extract 3 objects from the first position BY VARIABLE SUBSTR(VAR, 1, 3) PROC SORT DATA = LIBNAME.NEW; UPCASE(Var)/LOWCASE(Var) BY VAR1 DESCENDING VAR2;RUN; Extraction from a variable[Value=123]
To know the End Date when start date and duration is known INTNX(“UNIT”, START DATE, DURATION) To get the date of the end of the month/week PROC SUMMARY DATA=LIB.DATA MEAN; INTNX(“UNIT”, START DATE, DURATION,’E’) VAR X; CLASS SEX; To get the date of the start of the month/week OUTPUT OUT= LIB.OUT; RUN; INTNX(“UNIT”, START DATE, DURATION,’S’) To know the duration when End Date and Start Date is given INTCK("UNIT", DATE1, DATE2)