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

dear SAS experts,

 

I typed:

 

proc report data=class;
    column name age;
    define name / display;
    define age  / display;
    compute age;
       if age < 65
       then call define (_row_,'style' compute,'style=[background=lightblue]');
    endcomp;
run;

and got the following error message:

1           if age < 65 then call define (_row_,'style' compute,'style=[background=lightblue]');
                                                        _______
                                                        22
                                  ______
2                                                          The SAS System                            16:33 Wednesday, April 28, 2021

                                  253
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, ><, >=, AND, EQ, GE, 
              GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.  

ERROR 253-185: The DEFINE subroutine call has too many arguments.

how should I correct the error?

 

thx,

regards

PY

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Take the word COMPUTE out of that line.


Please, in the future, when you get an ERROR in the LOG, show us the entire LOG for that PROC or DATA step. Do not show us a portion of the log for that PROC or DATA step.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Take the word COMPUTE out of that line.


Please, in the future, when you get an ERROR in the LOG, show us the entire LOG for that PROC or DATA step. Do not show us a portion of the log for that PROC or DATA step.

--
Paige Miller
PierreYvesILY
Pyrite | Level 9
Thank you Paige

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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