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
;
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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