I choose any table - I can change it any time. The table has numeric and character variables. I would like to have possibility to search and find any text in character columns, for example by prompt manager, and show all rows for typed text.
Could you give me some tips how I should start? I thought about prompts one for type the text, and the second one to choose character variables (but they can change if I change the table).
Thank you in advance.
I think this is what you want
I think this is what you want
Here is a reference that illustrates how to refer to variables and datasets in a short cut list:
https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html
You can refer to the _character_ for all variables.
Using something like the following should get you started. X will concatenate all character variables into a single string that you cna then search with FIND/INDEX. Not sure what you want to do after that.
x = catx("|", of _character_);
y = find("ValueToFind", x);
@MargoBlue wrote:
I choose any table - I can change it any time. The table has numeric and character variables. I would like to have possibility to search and find any text in character columns, for example by prompt manager, and show all rows for typed text.
Could you give me some tips how I should start? I thought about prompts one for type the text, and the second one to choose character variables (but they can change if I change the table).
Thank you in advance.
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: