Help using Base SAS procedures

Error 22-322

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Error 22-322

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;


Accepted Solutions
Solution
‎01-13-2013 08:29 AM
Respected Advisor
Posts: 4,644

Re: Error 22-322

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


All Replies
Solution
‎01-13-2013 08:29 AM
Respected Advisor
Posts: 4,644

Re: Error 22-322

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
New Contributor
Posts: 2

Re: Error 22-322

thanks very much. it did work.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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