Finding a value in a large table usually means writing a query first: guess which column it lives in, write a WHERE clause, run it, and try again when you guess wrong. Data Controller's full table search removes that step. Choose a library and table in the Viewer, type a value into the search box and press Enter - every column in the table is scanned for it, and the matching rows come straight back into the grid.
The search box sits in the Viewer toolbar, next to a Numeric checkbox:
CONTAINS operator, so smith finds Goldsmith but not Smithson.Whichever you use, the results are ordinary rows in the Viewer, with the rest of the screen behaving exactly as it does for a normal view.
The scan runs inside SAS, against whichever libname engine the table is assigned to - so it is not limited to SAS datasets.
This feature, like most of Data Controller, is built on the SASjs Macro Core library, using the %mp_searchdata() macro. The macro assembles a single DATA step with one OR clause per column - a CONTAINS test for character columns, an equality test for numeric ones - and writes out only the matching records. It is MIT licensed, so you can read, test and audit the code that is running against your data.
A few things worth knowing:
See it in action:
More detail in the Viewer documentation.
Data Controller is the product of a UK company with a singular focus on SAS Web Apps.
Data Controller source is on our self-hosted Gitea Repository; the underlying SASjs framework is on GitHub.
