<?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 log files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230512#M41808</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please a want to create one log file for all the treatement ( log_all_trt.txt)&amp;nbsp; and a log file file for every sub-treatement ( log_treatement_1.txt, log_treatement_2.txt....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want this treatement&amp;nbsp; to be in log file: log_all_trt.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=toto; run;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; I want this treatement&amp;nbsp; to be in log file : log_treatement_1.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base=t1 comp=t2; run;&amp;nbsp; =&amp;gt; I want this treatement&amp;nbsp; to be in log file : log_treatement_2.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sun, 18 Oct 2015 22:05:18 GMT</pubDate>
    <dc:creator>LineMoon</dc:creator>
    <dc:date>2015-10-18T22:05:18Z</dc:date>
    <item>
      <title>log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230512#M41808</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please a want to create one log file for all the treatement ( log_all_trt.txt)&amp;nbsp; and a log file file for every sub-treatement ( log_treatement_1.txt, log_treatement_2.txt....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want this treatement&amp;nbsp; to be in log file: log_all_trt.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=toto; run;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; I want this treatement&amp;nbsp; to be in log file : log_treatement_1.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base=t1 comp=t2; run;&amp;nbsp; =&amp;gt; I want this treatement&amp;nbsp; to be in log file : log_treatement_2.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2015 22:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230512#M41808</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-10-18T22:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230516#M41809</link>
      <description>&lt;P&gt;Have a look at the documentation for PROC PRINTTO:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146809.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146809.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2015 23:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230516#M41809</guid>
      <dc:creator>dkb</dc:creator>
      <dc:date>2015-10-18T23:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230544#M41822</link>
      <description>&lt;P&gt;Well, there are a couple of points in there. &amp;nbsp;Firstly why do you want to split a log - which is the description of a program run, not data - based on data? &amp;nbsp;This doesn't make sense. &amp;nbsp;If you want to create output files on a by group within your data, then do that in proc report. &amp;nbsp;Now saying that, to split it out into different files, you would need to create a loop over the distinct treatment values:&lt;BR /&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; create table LOOP as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; select distinct TRT&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; from &amp;nbsp; HAVE;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set loop;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; call execute(cats('%print_data (indat=have,rep_name=report_',trt,',whre=',trt,');');&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above code will create a call to print data macro for each trt. &amp;nbsp;Something like that can be used to create any output files (e.g. log), however personall I wouldn't associate a log - again which is a run of code - with a data report.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230544#M41822</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-19T10:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230638#M41853</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure of what platform you are running this on, but if you are using mainframe Z/OS, you might consider having one subtreatment in a generational file and then at the end in a separate JCL step, you might concatenate the gdgs into one dataset through a SyncSort - Copy option and you will have all subtreatments combined to one master dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The individual generations will be pointing to sub-treatments and the output of the SyncSort &amp;nbsp;copy will hold the master data that includes all subtreatments.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are running in a Unix platform, you might use a concatenation utility to do what Syncsort does on the mainframe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps...!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 19:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-files/m-p/230638#M41853</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-10-19T19:39:29Z</dc:date>
    </item>
  </channel>
</rss>

