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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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