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 (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info 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

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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