hello RW9 HNY, macro to generate report in PDF,RTF,EXCEL FROM INPUT DATASET..... Parameters to be used 1) indsn – Input Dataset 2) varlist – List of Variables to be printed. If none then print all variables in the dataset 3) report_type – PDF or Excel or RTF. You need to use appropriate ODS statements. 4) title1 – Title1 of the report 5) footnote1 – Footnote1 of the report 6) report_location – Physical location of the report. this is my question.. am working on.... %macro reportgen(indsn=,varlist=, report_type=, title1=, footnote=, report_location=); %local i nextword; %let dsid =%sysfunc(open(&indsn)); %do i=1 %to %sysfunc(countw(&varlist)); %let nextword = %scan(&varlist, &i); %if %sysfunc(varnum(&dsid,&nextword))> 0 %then %do; %put Variable &nextword exists!; %end; %mend reportgen; %macro reportgen(indsn=work.test, varlist=var1,var2,var4,report_type=,title,footnote,report_location); am stuck here....reading d varlist but how can i incorporate rest of the variables if varlist empty & incorporate rest of the parameters in the code logic....
... View more