Hi there, I'm trying to run SAS graph into a sas item store before replaying into a single PDF using PROC DOCUMENT and the issue I have is that I only want to present the top level bookmark in the PDF. I see various methods and solutions for achieving this for PROC REPORT (using the contents ="") however I cannot find a similar SAS/GRAPH solution for when the graphs span more than one page. Using the description option only controls the bookmark name, and when setting description = "" this only creates a blank bookmark where as I do not want this bookmark creating at all. Below is some sample code to show the issue I face. Any help would be very much appreciated! ods document name=temp(write);
proc sort data=sashelp.class out=class; by sex; run;
ods noproctitle;
ods proclabel="";
proc sgplot data=class description="";
by sex;
scatter x=height y=weight;
run;
ods document close;
/* Create data set from all levels */
ods output properties=temp;
proc document name=temp;
list / levels=all;
run;
quit;
/* Create a unique macro variable for each object */
data _null_;
set temp end=last;
if type in("Table","Report","Graph") then do;
count+1;
call symput('path'||trim(left(count)),path);
end;
if last then call symput('total',count);
run;
/* Loop through each macro variable and copy the output */
/* object to a new folder and then replay it. */
%macro test;
ods pdf file="temp.pdf";
proc document name=temp;
make \ newfolder;
setlabel \ newfolder "I only want one level of bookmark for this SGPLOT";
%do i=1 %to &total;
copy &&path&i to \ newfolder#1;
%end;
replay \newfolder;
run;
quit;
ods pdf close;
%mend;
%test;
... View more