I have written a macro which takes multiple datasets and the variables common with those datasets and generates a frequency table using proc freq, as follows:
%macro f(input= , vars= );
%let n_d=%sysfunc(countw(&input));
%do i = 1 %to &n_d;
%let dataset = %scan(&input, &i);
%let n=%sysfunc(countw(&vars));
%do j = 1 %to &n;
%let values = %scan(&vars, &j);
title "Frequency of &dataset and &values";
proc freq data = &dataset;
tables &values/nocum;
run;
%end;
%end;
%mend;
I work with UNIX SAS and my version of SAS doesn't have access to HTML output because of some network issues.
I want to create a pdf output and for each of the above frequency tables and store it either in a single pdf or in a multiple pdf's(not too particular on that). Please help!!