<?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: Macro Programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542562#M149919</link>
    <description>&lt;P&gt;Your situation is not clear.&lt;/P&gt;
&lt;P&gt;There is not enough information what do you mean by&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;all the sas codes&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;You do not need macro programming to replace CALL EXECUTE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In some cases, instead CALL EXECUTE it is more convenient to generate the program as a file.&lt;/P&gt;
&lt;P&gt;When ready run %include of that file/program to execute it. It is much easier to debug it.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2019 20:12:14 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2019-03-12T20:12:14Z</dc:date>
    <item>
      <title>Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542558#M149918</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be the other way of running all the sas codes without using call execute ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 20:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542558#M149918</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-03-12T20:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542562#M149919</link>
      <description>&lt;P&gt;Your situation is not clear.&lt;/P&gt;
&lt;P&gt;There is not enough information what do you mean by&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;all the sas codes&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;You do not need macro programming to replace CALL EXECUTE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In some cases, instead CALL EXECUTE it is more convenient to generate the program as a file.&lt;/P&gt;
&lt;P&gt;When ready run %include of that file/program to execute it. It is much easier to debug it.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 20:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542562#M149919</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-12T20:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542614#M149931</link>
      <description>&lt;P&gt;you could call each SAS program with an include statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First point to the SAS progams&lt;/P&gt;
&lt;P&gt;%include "mypath/prog1.sas";&lt;/P&gt;
&lt;P&gt;%include "mypath/prog2.sas"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then call the SAS programs&lt;/P&gt;
&lt;P&gt;%prog1;&lt;/P&gt;
&lt;P&gt;%prog2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 00:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542614#M149931</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-03-13T00:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542716#M149970</link>
      <description>&lt;P&gt;Most of the time, I use a datastep which writes code, and then a %INCLUDE statement to execute the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I prefer it to CALL EXECUTE because when you are developing, you can take a look at the code you have generated before submitting it, and when you have many steps in the generated code, you can submit them one at a time, to see if the results are as expected before going on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g.:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tempsas temp;

data _null_;
  file tempsas;
  /* here are the statements to write the code */
run;

%include tempsas;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Mar 2019 10:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542716#M149970</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2019-03-13T10:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542747#M149987</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way we will use the Call Execute for running multiple SAS Macro, Consider the below example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Data1;&lt;/P&gt;&lt;P&gt;call execute ('%macro1');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you suggest way to execute the multiple macro / &amp;nbsp;all the sas codes without using call execute ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;People suggested today "%include", That looks good me, Likewise do you have any other approach ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 12:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542747#M149987</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-03-13T12:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542753#M149989</link>
      <description>&lt;P&gt;filename x '\my_code_path\';&lt;/P&gt;
&lt;P&gt;%include x /source2 lrecl=1000000;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 12:44:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542753#M149989</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-03-13T12:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542778#M149996</link>
      <description>&lt;P&gt;I get confuse with %include, Could you please explain the full syntax for it Correct me if i'm wrong below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How to create&amp;nbsp; store the program in file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filename Myfile "C:/Myfile/Test/exp.?"&amp;nbsp; &amp;nbsp; -----Here What should be the file extension name ? would it should be .SAS ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;SPAN&gt;%include "???";&amp;nbsp; --What should be here exact path with File name and .ext ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jai&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 13:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/542778#M149996</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-03-13T13:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/543436#M150220</link>
      <description>&lt;P&gt;What I very often do is exactly what I demonstrated. By allocating the file using the "temp" directive, it gets allocated in the Work directory (slightly different on z/OS, but that's another story). And the file will automatically be deleted when freed.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 08:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/543436#M150220</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2019-03-15T08:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/543443#M150224</link>
      <description>&lt;P&gt;Yes. Use the extension .SAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then %Include Myfile;&lt;/P&gt;&lt;P&gt;You don't need the path on the include statement.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 09:05:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Programming/m-p/543443#M150224</guid>
      <dc:creator>DanielLangley</dc:creator>
      <dc:date>2019-03-15T09:05:38Z</dc:date>
    </item>
  </channel>
</rss>

