I need a macro that will print out the "proc content" and the first 'k' observations of any dataset. Then I need it to further calculate some summary statistics of those first k observations such as mean, max, std and skewness. I'm familiar with SAS but I'm absolutely new to MACROS - to the point where documentation is confusing me.
I know in order to print out the first five variables you could use OBS and FIRSTOBS which I did in my previous work.
PROC PRINT DATA = WORK.CA(firstobs= 5 obs= 9);
RUN;
The same logic I can apply to summary statistics by using PROC MEANS by calculating std mean and so on. But how do I use a macro to make it applicable to any dataset?