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
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

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1063 views
  • 2 likes
  • 3 in conversation