Hi Paige, Thank you for your quick response! Please find the corrected code below, but I m still not getting what I want to. i.e. convert 202003 to march2020 Data _NULL_; Month = intnx('month', Today(), -13); Put Month monyy7.; Run; data xxx; fle = 'xxx_xxxx_202003'; /*filename*/ a = scan(fle,-1,'_'); a1=(input(scan(fle,-1,'_'),best12.)); a2=(input(scan(fle,-1,'_'),6.)); a3=(put(scan(fle,-1,'_'),monyy7.)); a4=(input(scan(fle,-1,'_'),monyy7.)); format a1 monyy7. a2 monyy7. ; run; proc contents data = xxx;run;
... View more