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?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1235 views
  • 0 likes
  • 2 in conversation