BookmarkSubscribeRSS Feed
amar_monk
Calcite | Level 5

I have a unique request where I am looking for a filter query like this:

amar_monk_0-1699918693463.png

to be created from the proc freq output like this:

amar_monk_1-1699918740743.png

To make it clear, lets say if I use a shortcut like Ctrl+Shift+C when selecting the row 1 (as highlighted in the above picture), I should be getting this filter query make = "Acura" and type = "SUV" in the clipboard to be pasted in the original dataset. Is this possible by recording macros in SAS EG or some other technique?

This will be very useful in the clinical datasets I am working to filter out the specific parts of large dataset.

2 REPLIES 2
LinusH
Tourmaline | Level 20

Trying to understand your requirement.

  1. You run a FREQ.
  2. In the results window you type a selection criteria
  3. You want to use the same criteria on the original dataset

How are you intend to use your original dataset after applying the criteria?

I mean, you can copy/paste the criteria in the data window of your original dataset.

Or paste into a code node so you get an output dataset.

If you want other not so proficient users to do this task you might want to create a stored  process using prompts for this.

Data never sleeps
amar_monk
Calcite | Level 5

// you might want to create a stored  process using prompts for this//

 

How to do this?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 779 views
  • 0 likes
  • 2 in conversation