Hi
I have a very basic code which I try to use to map the date ranges , yet majority of the time I get a symbolic reference error.
below is the code and i have added a screen shot on the error ,
Data check_1;
dateformob=(put(intnx('mon',"&SYSDATE."D,-1,'e'), date9.));
call symput('dateformob',put(intnx('mon',"&SYSDATE."D,-1,'e'), date9.));
rfd_dt=%SYSFUNC(today());
format rfd_dt date9.;
call symput('rfd_dt',%SYSFUNC(today()));
TIME_RANGE=intnx('month',today(),-6,'s');
call symput('TIME_RANGE',intnx('month',today(),-6,'s'));
format TIME_RANGE date9.;
YYMM=(put(intnx('mon',today(),-1,'e'), yymmn4.));
call symput('YYMM',put(intnx('mon',today(),-1,'e'), yymmn4.));
dt_=%SYSFUNC(today())-1;
format dt_ YYMMDDN8.;
dt= putn( dt_,vformat(dt_));
run;
%put &rfd_dt &TIME_RANGE &dateformob &YYMM &dt ;
If someone can help me resolve this would be great !!
Thanks!!
Your %put statement refers to &dt. But the code you posted never creates &dt. It must come from other code not shown here that sometimes runs and sometimes doesn't run.
Also note, you use today() both with and without %SYSFUNC. Since all uses are in DATA step statements, omit %SYSFUNC when using today().
Your %put statement refers to &dt. But the code you posted never creates &dt. It must come from other code not shown here that sometimes runs and sometimes doesn't run.
Also note, you use today() both with and without %SYSFUNC. Since all uses are in DATA step statements, omit %SYSFUNC when using today().
In the code you show, &dt is never defined.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.