<?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 Re: put statement when writing out to csv in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616481#M180488</link>
    <description>&lt;P&gt;The usual way to write values to a file instead of the log is to redirect them yourself using the FILE statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;file "path to the file where you want the PUT messages written";&lt;BR /&gt;&lt;SPAN&gt;put name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2020 14:24:09 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-01-10T14:24:09Z</dc:date>
    <item>
      <title>put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616470#M180483</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have inherited some code that uses a put statement within data _null_ step to write out to csv.&amp;nbsp; Is there any way to prevent the put statement from writing out values to the log?&amp;nbsp; Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log&lt;/P&gt;
&lt;P&gt;83129 data _null_;&lt;BR /&gt;83130 set sashelp.class;&lt;BR /&gt;83131 put name;&lt;BR /&gt;83132 run;&lt;/P&gt;
&lt;P&gt;Alfred&lt;BR /&gt;Alice&lt;BR /&gt;Barbara&lt;BR /&gt;Carol&lt;BR /&gt;Henry&lt;BR /&gt;James&lt;BR /&gt;Jane&lt;BR /&gt;Janet&lt;BR /&gt;Jeffrey&lt;BR /&gt;John&lt;BR /&gt;Joyce&lt;BR /&gt;Judy&lt;BR /&gt;Louise&lt;BR /&gt;Mary&lt;BR /&gt;Philip&lt;BR /&gt;Robert&lt;BR /&gt;Ronald&lt;BR /&gt;Thomas&lt;BR /&gt;William&lt;BR /&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 13:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616470#M180483</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2020-01-10T13:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616476#M180486</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58206"&gt;@kimdukes77&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have inherited some code that uses a put statement within data _null_ step to write out to csv.&amp;nbsp; Is there any way to prevent the put statement from writing out values to the log?&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log&lt;/P&gt;&lt;P&gt;83129 data _null_;&lt;BR /&gt;83130 set sashelp.class;&lt;BR /&gt;83131 put name;&lt;BR /&gt;83132 run;&lt;/P&gt;&lt;P&gt;Alfred&lt;BR /&gt;Alice&lt;BR /&gt;Barbara&lt;BR /&gt;Carol&lt;BR /&gt;Henry&lt;BR /&gt;James&lt;BR /&gt;Jane&lt;BR /&gt;Janet&lt;BR /&gt;Jeffrey&lt;BR /&gt;John&lt;BR /&gt;Joyce&lt;BR /&gt;Judy&lt;BR /&gt;Louise&lt;BR /&gt;Mary&lt;BR /&gt;Philip&lt;BR /&gt;Robert&lt;BR /&gt;Ronald&lt;BR /&gt;Thomas&lt;BR /&gt;William&lt;BR /&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Assuming you're sure your code runs without errors, you can try adding:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options nonotes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to just before your data _null_ step&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then add&lt;/P&gt;&lt;P&gt;options notes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to just after your data _null_ step&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might be able to just use options nosource / options source instead; I'm not sure which one will suppress the PUT info being copied to the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616476#M180486</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2020-01-10T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616481#M180488</link>
      <description>&lt;P&gt;The usual way to write values to a file instead of the log is to redirect them yourself using the FILE statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;file "path to the file where you want the PUT messages written";&lt;BR /&gt;&lt;SPAN&gt;put name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616481#M180488</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-01-10T14:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616482#M180489</link>
      <description>&lt;P&gt;Thank you for the response.&amp;nbsp; I probably (definitely) should have mentioned in my original post that I have tried nonotes, nosource and nosource2 and none of those options work.&amp;nbsp; Values are still written out to the log.&amp;nbsp; I suspect I will need to write out log to a txt file (not the preferred option) or update the code to use proc report or print instead of _null_ and put.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616482#M180489</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2020-01-10T14:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616485#M180491</link>
      <description>&lt;P&gt;Amazing thank you!&amp;nbsp; A simple and elegant solution to what I foolishly assumed was a complex problem!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616485#M180491</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2020-01-10T14:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: put statement when writing out to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616486#M180492</link>
      <description>&lt;P&gt;If you don't want data in the log, remove (or comment) the put statement. Right now, the put statement explicitly forces SAS to write to the log.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-when-writing-out-to-csv/m-p/616486#M180492</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-10T14:32:00Z</dc:date>
    </item>
  </channel>
</rss>

