Hello SASPhile,
It could look something like this:
[pre]
%let m=S:\Per\IMS\SAS\INFILES\Jan 2010 ZUD.txt;
%let mt=%SUBSTR(%SCAN(&m,-1,%STR(\)),1,3);
%let yr=%SUBSTR(%SCAN(&m,-1,%STR(\)),5,4);
%put mt=&mt yr=&yr;
data _null_;
length m $2;
date="01&mt.&yr."d;
format date date7.;
m=put(MONTH(date),2.);
if month(date) < 10 then m="0"||m;
call symputx('mon',m);
run;
%put mon=&mon yr=&yr;
%let datamon=%SYSEVALF(&yr*100+&mon);
%let currmon=&yr.-&mon.-01;
%put datamon=&datamon currmon=&currmon;
[/pre]
Sincerely,
SPR
... View more