Hi @mrdlau
With SAS Enterprise Guide (EG), you may want to start with the Query Builder.
For the below example, I'm using the SASHELP.CLASS dataset with EG7.1.
First, I have to create the VALUE prompt, this is what the Prompt Type and Values tab looks like.
I'm using a static list but if you want to use a dynamic one, remember your table has to be registered with the metadata. So it's not possible if you use a local server, from an EG perspective.
Then moving on to the Query Builder, based on SASHELP.CLASS.
After you moved your variables, from the Filter Data tab, create a new filter (far right icon).
Select the Basic Filter one, pick Name (in my case) and:
- In a list is the operator
- Check Generate filter for a prompt value
- Select the down arrow (on the right) next to Value.
- From the Prompts tab, select &value (the prompt we created earlier)
Running the Query Builder will allow the user to pick multiple values from the list.
If I select Jane and John from the prompt, this is the output dataset I get.
You can directly use the clause with a Proc Print for instance:
proc print data=sashelp.class;
WHERE %_eg_WhereParam(Name, value, IN, TYPE=S, IS_EXPLICIT=0 );
run;
Hope that helps.
Cheers, Damo
... View more