BookmarkSubscribeRSS Feed
deleted_user
Not applicable
here data
data one;
input id sale amt;
cards;
101 150 4500
102 200 5500
103 210 6000
;
condition sale >=200
by using macros
i want output with code

regards
satya
1 REPLY 1
1162
Calcite | Level 5
I don't see the reason to use a macro. Why not just use one of these (it's not clear from your post whether you want a new dataset, a printout, or some other result)?

proc print data=one noobs;
where sale >= 200;
run;

or

data two;
set data one;
where sale >= 200;
run;

or

data one;
input id sale amt;
if sale >= 200 then output;
cards;
101 150 4500
102 200 5500
103 210 6000
;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 681 views
  • 0 likes
  • 2 in conversation