Creation of macros to run proc univariate on multiple tables from the ODBC (Oracle Server) and saving this in a single table.
I have around 40 tables in a particular schema on the Oracle server and would like to run Proc univariate on all the numeric fields from the tables and save it in a single table.
I know this is limited information, but I wanted to start with the high level and provide more information based on the updates I receive.
Thank you so much!
Write a macro that loops through all of the Oracle tables and performs PROC UNIVARIATE on it, with results being stored in a SAS data set. In the same loop, append each SAS data set to the previous (PROC APPEND).
Much like @PaigeMiller you have provided the high level, so nothing further for us to comment on.
If it was me doing it I would break it down as:
1) Get data from database and save to SAS datasets in a given library.
2) Generate the code from SASHELP.VTABLE, something like:
data _null_;
set sashelp.vtable (where=(libname="YOURLIB"));
call execute('proc univariate....;
proc append base=...);
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.