Hi
I am trying to create a macro that will allow me to produce a box plot and save it as a (.rtf) file using ODS. I want to define the directory to which the file will be saved as a macro parameter. But I am having problems with this step.
I have created the SAS program first (below) and it works
ods listing close;
ods rtf file='c:\data\Boxplot.rtf';
proc sort data = register;
by type;
proc boxplot data=register;
plot sbp*type;
run;
ods rtf close;
ods listing;
However when I create the macro I am having problems defining the directory path as a macro parameter. I have tried different formats to define the ODS directory path in the marco using the parameter (one example below) . However I keep receiving log error that the directory does not exist.
%macro graphics(parm1);
ods listing close;
ods rtf file= &parm1 'Boxplot.rtf';
proc sort data = register;
by type;
proc boxplot data=register;
plot sbp*type;
run;
ods rtf close;
ods listing;
%mend graphics;
%graphics(c:\data\);
I assume I am not using the macro parameter correctly. Any suggestions would be appreciated.
cheers, Alistair
Message was edited by: Alby