Thanks Tom - your code works great both in EG as well as in the stored process. Am missing one basic question here; Please see the tested code below in EG; the Catx is putting a space between the gender valuess, however, when it gets resolved in the "in" operator in where clause, it resolves as 'F' , 'M'. Is the "in" operator in SAS forces the commas to appear in the "where" clause in the print procedure? Please clarify. 34 %let MULTISELECT_GENDER1=M; 35 %let MULTISELECT_GENDER2=F; 36 %let MULTISELECT_GENDER_COUNT=2; 37 38 data _null_; 39 length str $200 ; 40 do i=1 to &multiselect_gender_count; 41 str=catx(' ',str,quote(symget(cats('multiselect_gender',i)),"'")); 42 end; 43 call symputx('multiselect_gender',str); 44 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 45 %put multiselect_gender = &multiselect_gender. ; multiselect_gender = 'M' 'F' 46 47 proc print data = sashelp.class ; 48 where sex in (&multiselect_gender.) ; 49 run ; 2 The SAS System 12:34 Friday, May 12, 2017 NOTE: There were 19 observations read from the data set SASHELP.CLASS. WHERE sex in ('F', 'M'); NOTE: PROCEDURE PRINT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds
... View more