BookmarkSubscribeRSS Feed
RowIges
Calcite | Level 5

Hi all,

 

I'm struggling with my ods pdf TOC when using PROC LIFETEST along with ODS SELECT.

Beside the text defined in the ODS PROCLABEL statement, I get a second line in the TOC named "Survival Curves" which refers to the same graph. Can I get rid of it? 

ods pdf output='mypath\filename.pdf' style = journal contents=on pdftoc = 1;
ods graphics on; ods listing gpath='mypath'; ods graphics / imagename="g_tte_1" imagefmt=png; ods noproctitle; ods proclabel = 'Figure 14.2.2.59 Kaplan-Meier Plot of Time to XXX'; ods select survivalPlot; proc lifetest data=mydat plots =(survival(atrisk(outside(0.15)) test)); time T*censor(0); strata group; run; ods graphics off; ods pdf close;

dde.png

2 REPLIES 2
Quentin
Super User

Bari Lawhorn has a great paper on PDF TOC: https://support.sas.com/resources/papers/proceedings11/252-2011.pdf

 

She presented it as a webinar to BASUG last year. 

 

The slides are: https://www.basug.org/_files/ugd/6fce8c_aba2be0893314fa3bb3ca2c22fc1fc90.pdf

The recoding is: https://www.basug.org/videos?wix-vod-video-id=a17c9abb623e4f64b2ef843b0589dad3&wix-vod-comp-id=comp-...

 

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
Ksharp
Super User
ods document name=testAW(write);
ods select survivalPlot;
proc lifetest data=sashelp.bmt ;
time T*status(0);
strata group;
run;
ods document close;
proc document name=testAW;
list/ levels=all; run;
quit;



proc document name=testAW2(write);
setlabel \work.testAW\Lifetest#1\SurvivalPlot#1  "Figure 14.2.2.59    Kaplan-Meier Plot of Time to XXX";
copy \work.testAW\Lifetest#1\SurvivalPlot#1 to ^;  /*copy to current directory*/
run;
list/ levels=all; run;
quit;

/*Create the desired PDF file*/
proc document name=work.testAW2;
ods pdf file="c:\temp\want.pdf" style = journal contents=on pdftoc = 1;
replay;
run;
ods pdf close;
quit;

Ksharp_0-1727145196694.png

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1586 views
  • 2 likes
  • 3 in conversation