BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello,

I would like to put a where statement to reduce the size of one of the dataset.

First question is it possible to do it and if so how?

 

 

data dest1.&filename dest2.&filename._Anonym;
merge source4.&filename. (in=inbase)
src1.**bleep**rmt_in_premds_intg_20241031 (in=inlist) (where=(filename eq "&filename."))
;
by ORGNL_SAS_DS_ROW_NBR;
if inlist and inbase then output dest2.&filename._Anonym;
else if inbase then output dest1.&filename.;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

You have the right idea, only the wrong syntax.  All of the dataset options appear in one set of ().

libref.memname(in=inlist where=(filename eq "&filename."))

View solution in original post

1 REPLY 1
Tom
Super User Tom
Super User

You have the right idea, only the wrong syntax.  All of the dataset options appear in one set of ().

libref.memname(in=inlist where=(filename eq "&filename."))

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1 reply
  • 845 views
  • 1 like
  • 2 in conversation