Hi Caesar.
The SAS Sql procedure uses a mixture of SQL standard syntax and SAS functions. Those listed in your message should be replaced by almost-equivalent SAS functions (check the SAS doc about them for the syntax, use, results, and so on).
TO_CHAR --> PUT
ADD_MONTH(thisDate, nbMonths) --> INTNX("MONTH", thisDate, nbMonths) + DAY(thisDate)-1
/* the INTNX("MONTH") function returns a date on the first day of the month */
TRUNC --> FLOOR / INT / ROUND (depending on what you want to do)
LAST_DAY --> INTNX("MONTH", date, 1) - 1
DECODE --> IFC / IFN (SAS 9 functions), CASE WHEN ELSE syntax
NVL(var1, var2) --> COALESCE(var1, var2)
Regards.
Olivier