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

Hello,

 

I'm struggling a bit with the syntax.

 

I have a macro variable 'volume' whose value will change every day. And the outobs option needs to be equal to twice this volume. when I run without the outobs option, it runs fine. This is what I'm doing:

 

%let volume = 10;



proc sql outobs= 2*&volume.;
insert into abc
select acc, id, flag, ' ' as trial
from old_table where flag = 'n';
quit;

 

 

this is the error that I get:

ERROR 22-322: Syntax error, expecting one of the following: ;, CHECK, CODEGEN, CONSTDATETIME, DOUBLE, DQUOTE, ERRORSTOP, EXEC, 
EXITCODE, FEEDBACK, FLOW, INOBS, IPASSTHRU, LOOPS, NOCHECK, NOCODEGEN, NOCONSTDATETIME, NODOUBLE, NOERRORSTOP, 
NOEXEC, NOFEEDBACK, NOFLOW, NOIPASSTHRU, NONUMBER, NOPRINT, NOPROMPT, NOREMERGE, NOSORTMSG, NOSTIMER, NOSTOPONTRUNC, 
NOTHREADS, NOWARNRECURS, NUMBER, OUTOBS, PRINT, PROMPT, REDUCEPUT, REDUCEPUTOBS, REDUCEPUTVALUES, REMERGE, SORTMSG, 
SORTSEQ, STIMER, STOPONTRUNC, THREADS, UBUFSIZE, UNDO_POLICY, WARNRECURS.

ERROR 200-322: The symbol is not recognized and will be ignored.

Appreciate the help. Thanks!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @AJ_Brien 

 

You need this: 


proc sql outobs= %eval(2*&volume);
insert into abc
select acc, id, flag, ' ' as trial
from old_table where flag = 'n';
quit;

View solution in original post

2 REPLIES 2
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @AJ_Brien 

 

You need this: 


proc sql outobs= %eval(2*&volume);
insert into abc
select acc, id, flag, ' ' as trial
from old_table where flag = 'n';
quit;
AJ_Brien
Quartz | Level 8
that worked, thank you!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1704 views
  • 0 likes
  • 2 in conversation