<?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 how to use proc print to create log files. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868504#M343089</link>
    <description>&lt;P&gt;Hello I am trying to create a log file by using proc print but when I run my program it creates an rtf&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; %let analydir=\\Biostatistics\Analysis\ ;

ods tagsets.rtf(ID=l_chemo) file="&amp;amp;analydir.\Output\l_10_chemotherapy.rtf" style=myrtfn; *styles.rtfn;

proc report nowd /*headline*/ headskip split='*' data=blank spacing=1 missing ;
  cols  a;
  define a / display '';
run;
         		   	        		 
  
ods tagsets.rtf(ID=l_chemo) close
ODS RTF close;

proc printto log="&amp;amp;analydir.\Log\l_10_chemo.rtf" NEW;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;RTF output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_0-1680810993879.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82400i0BE2E00A3F8DE230/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HitmonTran_0-1680810993879.png" alt="HitmonTran_0-1680810993879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 19:57:08 GMT</pubDate>
    <dc:creator>HitmonTran</dc:creator>
    <dc:date>2023-04-06T19:57:08Z</dc:date>
    <item>
      <title>how to use proc print to create log files.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868504#M343089</link>
      <description>&lt;P&gt;Hello I am trying to create a log file by using proc print but when I run my program it creates an rtf&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; %let analydir=\\Biostatistics\Analysis\ ;

ods tagsets.rtf(ID=l_chemo) file="&amp;amp;analydir.\Output\l_10_chemotherapy.rtf" style=myrtfn; *styles.rtfn;

proc report nowd /*headline*/ headskip split='*' data=blank spacing=1 missing ;
  cols  a;
  define a / display '';
run;
         		   	        		 
  
ods tagsets.rtf(ID=l_chemo) close
ODS RTF close;

proc printto log="&amp;amp;analydir.\Log\l_10_chemo.rtf" NEW;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;RTF output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_0-1680810993879.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82400i0BE2E00A3F8DE230/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HitmonTran_0-1680810993879.png" alt="HitmonTran_0-1680810993879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 19:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868504#M343089</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2023-04-06T19:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc print to create log files.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868507#M343092</link>
      <description>&lt;P&gt;LOG files have the text with the code you ran and the notes SAS generated.&lt;/P&gt;
&lt;P&gt;What would that have to do with PROC PRINT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And your posted code is not using PROC PRINT anyway.&amp;nbsp; It is using PROC REPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can redirect the LOG messages using PROC PRINTTO, but you have to do it BEFORE the messages are generated, not after.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just because you named the file you redirected the LOG to with a .rtf extension it will not make the content of the file be RTF code.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 20:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868507#M343092</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-06T20:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc print to create log files.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868508#M343093</link>
      <description>&lt;P&gt;RTF files are tagged&amp;nbsp;&lt;EM&gt;text&lt;/EM&gt; files. Open the file with a good text editor (e.g. Notepad++) and you will see that the log is pure text.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 20:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868508#M343093</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-06T20:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to use proc print to create log files.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868509#M343094</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; %let analydir=\\Biostatistics\Analysis\ ;

proc printto log="&amp;amp;analydir.\Log\l_10_chemo.txt" NEW;
run;

ods tagsets.rtf(ID=l_chemo) file="&amp;amp;analydir.\Output\l_10_chemotherapy.rtf" style=myrtfn; *styles.rtfn;

proc report nowd /*headline*/ headskip split='*' data=blank spacing=1 missing ;
  cols  a;
  define a / display '';
run;
         		   	        		 
  
ods tagsets.rtf(ID=l_chemo) close;
ODS RTF close;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PROC PRINTTO goes before your proc and you're missing a semicolon on one of your ODS statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 20:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-proc-print-to-create-log-files/m-p/868509#M343094</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-06T20:12:16Z</dc:date>
    </item>
  </channel>
</rss>

