Hi, i'm writing stored procedure in wich i have to pass a list of values in order to use it as a parameter and then use this parameter in a WHERE IN clause. I create a prompt fromlist = 'a','b','c','d',e' which is its default value %macro filter(fromlist); proc sql; select * from have WHERE var IN (&fromlist); quit; %mend; %filter( fromlist = &fromlist) It result in a error : ERROR: All positional parameters must precede keyword parameters. I also tried to use this code: I create a prompt fromlist = var IN ( 'a','b','c','d',e') which is its default value %macro filter(fromlist); proc sql; select * from have WHERE &fromlist; quit; %mend; %filter( fromlist = &fromlist) It result in a error : ERROR 22-322: Syntax error, expecting one of the following: a string between quotes, a numerical constant, a date and time constant, a missing value, (, -, SELECT.
... View more