data null;
format dt date9.;
d=put(month(today())-2,z2.);
if month(today())=1 then e=put(year(today())-1,4.);
else e=put(year(today()),4.);
f=e||d;
dt=input(put(f,6.),yymmn6.);
call symput ('Snapshot_date',intnx('month',dt,0,'e'));
run;
data null;
call symput ('L1M',put(intnx("month",&Snapshot_date,-1,'e'),date9.));
call symput ('L3M',put(intnx("month",&Snapshot_date,-3,'e'),date9.));
call symput ('L6M',put(intnx("month",&Snapshot_date,-6,'e'),date9.));
call symput ('L1Y',put(intnx("month",&Snapshot_date,-12,'e'),date9.));
call symput ('rpt_dte',put(&Snapshot_date,date7.));
call symput ('monyy',propcase(put(&Snapshot_date,monyy5.)));
call symput('Rbase2',put(intnx('month',&Snapshot_date,0,'e'),yymmddn8.));
run;
%put &Snapshot_date &L1M &L3M &l6M &L1Y &monyy &Rbase2;
Output#
19843 31MAR2014 31JAN2014 31OCT2013 30APR2013 Apr14 20140430
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.