BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Mathe
Calcite | Level 5

hi,

i have the following error problem and would like someone help with it.

19         Data Run_dates;

20         Mrg = 1;

21         Run_Model_Date = &Last_Month;

                            _

                            22

WARNING: Apparent symbolic reference LAST_MONTH not resolved.

22         Run_Date = &First_Month;

                      _

                      22

WARNING: Apparent symbolic reference FIRST_MONTH not resolved.

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,

              a missing value, INPUT, PUT. 

23         do While (Run_Date <= Run_Model_Date);

24            Output;

25             Run_Date = intnx("MONTH", Run_Date , 1, 'END');

26         end;

27         Format Run_Date date9.;

28         Keep Mrg Run_date;

29         run;

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

A thing like &name is a symbolic reference in SAS. Symbolic references are replaced by their values when the program is executed. Thus, to run your program you must first define &Last_Month and &First_Month with statements :

%let First_Month='01JAN2012'd;

%let Last_Month='31DEC2012'd;

PG

PG

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

A thing like &name is a symbolic reference in SAS. Symbolic references are replaced by their values when the program is executed. Thus, to run your program you must first define &Last_Month and &First_Month with statements :

%let First_Month='01JAN2012'd;

%let Last_Month='31DEC2012'd;

PG

PG
Mathe
Calcite | Level 5

thanks very much. it did work.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1116 views
  • 0 likes
  • 2 in conversation