BookmarkSubscribeRSS Feed
pdhokriya
Pyrite | Level 9

Hi Reader,

 

1. Could you please help me out to call the macro from another location.

 

2. This syntax I do not want to repeat, there are many numbers of dset/domain/supp_domain so is there other way to handle such senerio.

 

%let dset = meta_dm;
%let domain = dm1001;
%let supp_domain = suppdm;

 

3. Can you please share data step programming macro for below mention meta_dm.

4. Is there any other way to create meta_dm  by just calling? 

 

data meta_dm;
INFILE CARDS MISSOVER;
input variable $ label $ suppqual_flag $ remove $;
cards;
AAA NAME1 N Y
BBB NAME2 N
CCC NAME3 Y
DDD NAME4 N Y
  ;
RUN;


/**********************************************************************************************************/
%let dset = meta_dm;
%let domain = dm1001;
%let supp_domain = suppdm;

 

----------------Macro placed at other folder -------------
proc sql;
create table &domain as 
select remove ,variable ,label, suppqual_flag
from &dset
where remove = "" and variable ^= "" and label ^ = "" and suppqual_flag = "N";
create table &supp_domain as 
select remove ,variable ,label, suppqual_flag
from &dset 
where remove = "" and variable ^= "" and label ^ = "" and suppqual_flag = "Y";
quit;

 

Thank you in advance.

1 REPLY 1

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

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