<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Survival Macro title change in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737881#M230083</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SAS 9.4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to change the title of a proc lifetest but using the %ProvideSurvivalMacros and the documentation that comes from here (&lt;A href="https://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_kaplan_sect015.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_kaplan_sect015.htm&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I cannot seem to get the title to change. I have attached my code because I am obviously missing something. Any help would be greatly appreciated. Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/132;
   infile "http:&amp;amp;url/templft.html" device=url;
   file 'macros.tmp';
   retain pre 0;
   input;
   if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
   if pre then put _infile_;
   if index(_infile_, '&amp;lt;pre&amp;gt;')  then pre = 1;
run;
%inc 'macros.tmp' / nosource;
%ProvideSurvivalMacros                  
%let TitleText0 = "Figure 1";
%CompileSurvivalTemplates   
ODS LISTING image_dpi=300 GPATH = 'path' style=statistical;
ODS GRAPHICS ON / IMAGENAME = "Figure 1" IMAGEFMT=tiff HEIGHT=5in WIDTH=15cm 
	attrpriority=Color; 
proc lifetest data=cr.analysis OUTCIF=cif_output atrisk plots=cif(test) maxtime=600 NINTERVAL=100 timelist= 0 25 50 75 100 200 300 400 500 600;
	time tt_censor_date*binary_amputation(0)/eventcode=1;
	label tt_censor_date = 'Time (in wks) from DOS to Censor Date'
			gender = 'Gender';
	strata gender;
	ods output GrayTest=graytest;
run;
proc template;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival  /
          store=sasuser.templat;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival2 /
          store=sasuser.templat;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 29 Apr 2021 12:45:39 GMT</pubDate>
    <dc:creator>GS2</dc:creator>
    <dc:date>2021-04-29T12:45:39Z</dc:date>
    <item>
      <title>Survival Macro title change</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737881#M230083</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SAS 9.4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to change the title of a proc lifetest but using the %ProvideSurvivalMacros and the documentation that comes from here (&lt;A href="https://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_kaplan_sect015.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_kaplan_sect015.htm&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I cannot seem to get the title to change. I have attached my code because I am obviously missing something. Any help would be greatly appreciated. Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/132;
   infile "http:&amp;amp;url/templft.html" device=url;
   file 'macros.tmp';
   retain pre 0;
   input;
   if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
   if pre then put _infile_;
   if index(_infile_, '&amp;lt;pre&amp;gt;')  then pre = 1;
run;
%inc 'macros.tmp' / nosource;
%ProvideSurvivalMacros                  
%let TitleText0 = "Figure 1";
%CompileSurvivalTemplates   
ODS LISTING image_dpi=300 GPATH = 'path' style=statistical;
ODS GRAPHICS ON / IMAGENAME = "Figure 1" IMAGEFMT=tiff HEIGHT=5in WIDTH=15cm 
	attrpriority=Color; 
proc lifetest data=cr.analysis OUTCIF=cif_output atrisk plots=cif(test) maxtime=600 NINTERVAL=100 timelist= 0 25 50 75 100 200 300 400 500 600;
	time tt_censor_date*binary_amputation(0)/eventcode=1;
	label tt_censor_date = 'Time (in wks) from DOS to Censor Date'
			gender = 'Gender';
	strata gender;
	ods output GrayTest=graytest;
run;
proc template;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival  /
          store=sasuser.templat;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival2 /
          store=sasuser.templat;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Apr 2021 12:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737881#M230083</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2021-04-29T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Survival Macro title change</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737933#M230101</link>
      <description>&lt;P&gt;Sometimes you need to read the fine print as well as the code example. From the linked documentation page: (emphasis added )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;There are multiple title macro variables because two different types of plots are defined in the survival plot templates. The first macro variable, &lt;CODE class="AAvarname"&gt;TitleText0&lt;/CODE&gt;, contains the text that is the same for both types of plots. The second macro variable, &lt;CODE class="AAvarname"&gt;TitleText1&lt;/CODE&gt;, contains the title for the single-stratum case. The third macro variable, &lt;CODE class="AAvarname"&gt;TitleText2&lt;/CODE&gt;, contains the title for the multiple-strata case. Both &lt;CODE class="AAvarname"&gt;TitleText1&lt;/CODE&gt; and &lt;CODE class="AAvarname"&gt;TitleText2&lt;/CODE&gt; use the common text defined in &lt;CODE class="AAvarname"&gt;TitleText0&lt;/CODE&gt;. Both &lt;CODE class="AAvarname"&gt;TitleText0&lt;/CODE&gt; and &lt;CODE class="AAvarname"&gt;TitleText2&lt;/CODE&gt; were changed from their original definition; the definition of &lt;CODE class="AAvarname"&gt;TitleText1&lt;/CODE&gt; was copied from the %ProvideSurvivalMacros macro. &lt;FONT size="5" color="#FF00FF"&gt;&lt;STRONG&gt;You must provide all relevant %LET statements when you modify &lt;CODE class="AAvarname"&gt;TitleText0&lt;/CODE&gt;.&lt;/STRONG&gt; &lt;/FONT&gt;In this case it is &lt;CODE class="AAvarname"&gt;TitleText0&lt;/CODE&gt; and &lt;CODE class="AAvarname"&gt;TitleText2&lt;/CODE&gt;, but it is easy to copy all three and then just modify what you need. Alternatively, when you know the number of strata, you can modify only &lt;CODE class="AAvarname"&gt;TitleText1&lt;/CODE&gt; or &lt;CODE class="AAvarname"&gt;TitleText2&lt;/CODE&gt;.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So add the the other 2 TitleText macro variables and you should be good to go.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 14:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737933#M230101</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-29T14:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Survival Macro title change</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737941#M230104</link>
      <description>&lt;P&gt;I added the 2 lines and that did not fix the problem. Do you have any other thoughts on why this is not working? Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/132;
   infile "http:&amp;amp;url/templft.html" device=url;
   file 'macros.tmp';
   retain pre 0;
   input;
   if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
   if pre then put _infile_;
   if index(_infile_, '&amp;lt;pre&amp;gt;')  then pre = 1;
run;
%ProvideSurvivalMacros                   
%let TitleText0 = "Figure 1";
%let TitleText1 = &amp;amp;titletext0 " for " STRATUMID;
%let TitleText2 = &amp;amp;titletext0;
%CompileSurvivalTemplates   
ODS LISTING image_dpi=300 GPATH = 'path' style=statistical;
ODS GRAPHICS ON / IMAGENAME = "Figure 1" IMAGEFMT=tiff HEIGHT=5in WIDTH=15cm 
	attrpriority=Color; 
proc lifetest data=cr.analysis OUTCIF=cif_output atrisk plots=cif(test) maxtime=600 NINTERVAL=100 timelist= 0 25 50 75 100 200 300 400 500 600;
	time tt_censor_date*binary_amputation(0)/eventcode=1;
	label tt_censor_date = 'Time (in wks) from DOS to Censor Date'
			gender = 'Gender';
	strata gender;
	ods output GrayTest=graytest;
run;
proc template;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival  /
          store=sasuser.templat;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival2 /
          store=sasuser.templat;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Apr 2021 15:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737941#M230104</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2021-04-29T15:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Survival Macro title change</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737975#M230120</link>
      <description>&lt;P&gt;I don't have your data so cannot run all your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your log showing any warnings or errors? If so, set OPTIONS MPRINT; to get details of what is happening when the macros run and see if that shows anything.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 17:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737975#M230120</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-29T17:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Survival Macro title change</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737981#M230123</link>
      <description>I realize the lack of data is a challenge. The log does not have any obvious errors, at least to me. Thank you for your attempts</description>
      <pubDate>Thu, 29 Apr 2021 17:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Survival-Macro-title-change/m-p/737981#M230123</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2021-04-29T17:54:51Z</dc:date>
    </item>
  </channel>
</rss>

