Hi,
As of now SAS macro code is running in EG using metadata tables and creating 5 aggregated tables.
I need to automate this SAS macro code in DI studio.to create 5 aggregated tables. This is my requirement.
Can anybody help to get the solution for this. Thanks in advance.
Hi,
If you want to use the same macro code of EG as it is then you can use user written transformation in SAS DI studio.
Thanks,
Shiva
Thank you Shiva.
Here EG code we are generating 5 aggregated tables.
After using user written transformation in SAS DI studio same 5 aggregated tables will come out automatically.
For this 5 aggregated tables we need only 1 ETL job is enough or 5 ETL's need?
Hi,
Try this code in your user written transformation and try to run the user written transformation you can see two output data sets.or you can design all the logic in ETL jobs and can create 5 ETLs in one single work space or job itself.
%macro test(data ,input);
LIBNAME test BASE "f:\test\DATA";
data test.&data;
set sashelp.class;
where Sex="&input";
run;
%mend test;
%test(male ,M);
%test(female,F);
Thanks,
Shiva
Well. it depends on the characteristics of your macro.
if you use macro logic for some kind of looping, you can use the technique described by Shiva, and then, you need just one job (aka ETL).
But if you macro have parameters that is called five times, you van create a job that has input parameters, and then if possible, have an outer job calling the inner job in loop.
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 25. Read more here about why you should contribute and what is in it for you!
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.