<?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: Sending AUTOCALL MACRO program code stored in external file to SAS log during program execution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739319#M230730</link>
    <description>&lt;P class="xisDoc-shortDescription"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268542" target="_blank" rel="noopener"&gt;GBL__&lt;/A&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="xisDoc-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-shortDescription"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n0dk0dc3yeff1hn1murknwao75bb.htm" target="_self"&gt;SOURCE2 System Option&lt;/A&gt; specifies whether SAS writes secondary source statements from included files to the SAS log.&lt;/FONT&gt;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;SOURCE2 writes source statements from files that have been included by %INCLUDE statements or &lt;STRONG&gt;&lt;EM&gt;autocall macros&lt;/EM&gt;&lt;/STRONG&gt; to the SAS log.&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;So your solution is to place the following statement before your macro call:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&lt;CODE class=" language-sas"&gt;options source2;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;No need to read and write.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 May 2021 19:30:27 GMT</pubDate>
    <dc:creator>LeonidBatkhan</dc:creator>
    <dc:date>2021-05-05T19:30:27Z</dc:date>
    <item>
      <title>Sending AUTOCALL MACRO program code stored in external file to SAS log during program execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739316#M230729</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am curious what the best way is to print the source code to the log for an auto call macro program during that programs execution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I include a data null step to read in the .sas program while that macro is being ran?&amp;nbsp; Or would this cause an issue?&amp;nbsp; Such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%MACRO client_name ;

DATA _NULL_ ;
    INFILE "\\shared_drive\user_group\projects\client_programs\client_name\client_name.sas" ;
    INPUT ;
    PUT _INFILE_ ;
RUN ;


DATA work.import_data ;
    INFILE "&amp;amp;file_path.\&amp;amp;client_name.\raw_data_file.txt" TRUNCOVER ;
    INPUT
        @1    account    $10.
        @11   name       $30. ;
RUN ;


PROC PRINT DATA=work.import_data ;
RUN ;

%MEND client_name ;&lt;/PRE&gt;
&lt;P&gt;I have not been able to find a way to print autocall macro code to the log, like you can with stored compiled macros using %copy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739316#M230729</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2021-05-05T19:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sending AUTOCALL MACRO program code stored in external file to SAS log during program execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739319#M230730</link>
      <description>&lt;P class="xisDoc-shortDescription"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268542" target="_blank" rel="noopener"&gt;GBL__&lt;/A&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="xisDoc-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-shortDescription"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n0dk0dc3yeff1hn1murknwao75bb.htm" target="_self"&gt;SOURCE2 System Option&lt;/A&gt; specifies whether SAS writes secondary source statements from included files to the SAS log.&lt;/FONT&gt;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;SOURCE2 writes source statements from files that have been included by %INCLUDE statements or &lt;STRONG&gt;&lt;EM&gt;autocall macros&lt;/EM&gt;&lt;/STRONG&gt; to the SAS log.&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;So your solution is to place the following statement before your macro call:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&lt;CODE class=" language-sas"&gt;options source2;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;No need to read and write.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739319#M230730</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-05-05T19:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sending AUTOCALL MACRO program code stored in external file to SAS log during program execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739321#M230731</link>
      <description>I'M AN IDIOT.  THANK YOU!!!</description>
      <pubDate>Wed, 05 May 2021 19:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-AUTOCALL-MACRO-program-code-stored-in-external-file-to/m-p/739321#M230731</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2021-05-05T19:31:05Z</dc:date>
    </item>
  </channel>
</rss>

