Hello guys, In the SAS Enterprise Guide, a prompt defined that allows the user to select multiple values. Now in my PROC SQL, the prompt value returned is of a single value and not off of those I did type in like I expected. This is the code that I have: %macro promptList( promptVar = v_num, quotedList = yes listName = v_num); %local i list; %do i = 1 %to &&&promptVar._COUNT.; %if &i. eq 1 %then %if "edList eq yes %then %let list = %quote(%'&&&promptVar.%'); %else %let list = &&&promptVar.; %else %if "edList eq yes %then %let list = &&&listName., %quote(%'&&&promptVar&i.%'); %else %let list = &&&listName., &&&promptVar&i.; %end; %let list = %unquote(&&&listName.); &list %mend promptList; PROC SQL; CREATE TABLE Work.Payroll_History AS SELECT t1.V_NUMBER FROM HRS_PAYROLL t1 WHERE t1.V_NUMBER in (%promptList(v_num)); QUIT; It pops up 2 errors: ERROR: More positional parameters found than defined. ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value. Anyone can help me with this? Thank you so much!
... View more