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."))

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