<?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: Can the %put statement post text to outer file? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10948#M963</link>
    <description>The macro language %PUT statement, as document, "normally" posts / outputs macro processing diagnostic messages, including macro variable values, to the SAS log, however, yes, it is possible to re-direct the SAS-generated log to an external file using PROC PRINTTO.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 03 Nov 2009 03:51:41 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-11-03T03:51:41Z</dc:date>
    <item>
      <title>Can the %put statement post text to outer file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10947#M962</link>
      <description>Can the %put statement post text to outer file?</description>
      <pubDate>Tue, 03 Nov 2009 02:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10947#M962</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-11-03T02:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can the %put statement post text to outer file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10948#M963</link>
      <description>The macro language %PUT statement, as document, "normally" posts / outputs macro processing diagnostic messages, including macro variable values, to the SAS log, however, yes, it is possible to re-direct the SAS-generated log to an external file using PROC PRINTTO.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 03 Nov 2009 03:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10948#M963</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-03T03:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can the %put statement post text to outer file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10949#M964</link>
      <description>How about just export the specific macro variables that I want instead of the whole log file into external file?</description>
      <pubDate>Tue, 03 Nov 2009 19:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10949#M964</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-11-03T19:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can the %put statement post text to outer file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10950#M965</link>
      <description>use 'put' statement.</description>
      <pubDate>Tue, 03 Nov 2009 19:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10950#M965</guid>
      <dc:creator>abdullala</dc:creator>
      <dc:date>2009-11-03T19:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can the %put statement post text to outer file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10951#M966</link>
      <description>Hi:&lt;BR /&gt;
  Something similar to this technique might work for you:&lt;BR /&gt;
[pre]&lt;BR /&gt;
** Use PROC PRINTTO to get ONLY list of Macro vars;&lt;BR /&gt;
filename mylog "c:\temp\allmacvars.txt";&lt;BR /&gt;
PROC PRINTTO log=mylog; run;&lt;BR /&gt;
%put _all_;&lt;BR /&gt;
PROC PRINTTO; run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                    &lt;BR /&gt;
The PROC PRINTTO steps surround the %PUT _ALL_ -- so this will effectively capture what is written to the log as the result of the %PUT _ALL_ and then the log will return to normal after the second PROC PRINTTO.&lt;BR /&gt;
 &lt;BR /&gt;
You could, of course, put any number of specific %PUT statements in between the PRINTTO steps.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 03 Nov 2009 20:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-the-put-statement-post-text-to-outer-file/m-p/10951#M966</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-11-03T20:48:32Z</dc:date>
    </item>
  </channel>
</rss>

