Hi, the current month in which the code is running (11 for this month), the previous month (I want this value to be 10), 2 for the previous month (I want this value to be 9). I want to bring these values next to the fields under proc sql by assigning symput as m0, m1 and m2 respectively. Like vol_&m0 being vol_11 and vol_&m2 being 9. I would like your help on this issue 🙂 data new; set one; m= %sysfunc(month("&sysdate"d)); m_0 = m; m_1 = m - 1; m_2 = m - 2; m0 = put(m_0,BEST12.); m1 = put(m_1,BEST12.); m2 = put(m_2,BEST12.); call symput('m0',m0); call symput('m1',m1); call symput('m2',m2); run; proc sql; create table Vol_curr as select Vol_&m0, Vol_&m1, Vol_&m2, CURR_&m0, CURR_&m1, CURR_&m2 from lib.table; run;
... View more