Try using INTNX() to calculate date. Then you can use MONTH() and QTR() functions.
data have;
input ID YEAR WEEK wantMONTH $ wantQUARTER $;
date = intnx('week',mdy(1,1,year),week-1,'s');
month=month(date);
quarter=qtr(date);
format date yymmdd10.;
cards;
1 2018 1 1(Jan) 1st
1 2018 2 1(Jan) 1st
1 2018 51 12(Dec) 4th
;
want want
Obs ID YEAR WEEK MONTH QUARTER date month quarter
1 1 2018 1 1(Jan) 1st 2018-01-01 1 1
2 1 2018 2 1(Jan) 1st 2018-01-08 1 1
3 1 2018 51 12(Dec) 4th 2018-12-17 12 4