<?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 I run a specific part of code without using macro? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595725#M171444</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;Thanks. I actually tried code like this. But the thing is that the numbers following %include (4-6 in your example) are the line numbers in the log window, not in the code file, if I understood correctly. I'll try this way a little further. By the way, what do you mean by call execute? Could you give a little more hint?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;You are right. So, users have to be careful with that. Thanks for your answer as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2019 13:35:05 GMT</pubDate>
    <dc:creator>braam</dc:creator>
    <dc:date>2019-10-11T13:35:05Z</dc:date>
    <item>
      <title>Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595658#M171408</link>
      <description>&lt;P&gt;Dear All, I was wondering if I can repeat a certain part of my SAS code, as described below. Is there something like goto statement I can make use of? To be clear, I don't want to make a formal macro code for this, but I want to repeat the MAIN STATEMENTS by using %let statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MAIN SAS STATEMENTS (including %let var=;) from line 1 to 100&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let var= abc;&lt;/P&gt;
&lt;P&gt;Run the MAIN STATEMENTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let var= def;&lt;/P&gt;
&lt;P&gt;Run the MAIN STATEMENTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let var= ghi;&lt;/P&gt;
&lt;P&gt;Run the MAIN STATEMENTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, the code would be less than 110 lines. Hope that there is such a way to implement this. Of course, I now I can use the macro, but then all statements in the macro have the same color, so it's not so convenient to debug. This is perhaps my taste, but I really prefer this way. In addition, I have to revise my code from time to time. This way makes it easier for me. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 07:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595658#M171408</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T07:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595663#M171410</link>
      <description>&lt;P&gt;Store your MAIN statements in a separate SAS program called perhaps MAIN.sas then do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let var= abc;
%include 'MAIN.sas';

%let var= def;
%include 'MAIN.sas';

%let var= ghi;
%include 'MAIN.sas';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2019 08:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595663#M171410</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-11T08:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595705#M171428</link>
      <description>Thanks. But can it be possible within one SAS code?&lt;BR /&gt;Second, do you know how I can let my SAS run just a part of the external code file (rather than the entire code)?</description>
      <pubDate>Fri, 11 Oct 2019 12:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595705#M171428</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T12:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595712#M171432</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279507"&gt;@braam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks. But can it be possible within one SAS code?&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean you don't want MAIN.SAS as a separate file and then the code with %include in a separate file? Then I don't think this is possible without using macros; or if whatever you have in MAIN.SAS is just purely data step code in a single data step, with no PROCs, then you could do this via the LINK statement, which creates a "subroutine" inside the data step that can be used many times within the same data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Second, do you know how I can let my SAS run just a part of the external code file (rather than the entire code)?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Macros&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Of course, I now I can use the macro, but then all statements in the macro have the same color, so it's not so convenient to debug.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The advice is &lt;STRONG&gt;ALWAYS&lt;/STRONG&gt; to get the code working without macros and without macros variables for one or two situations, then the debugging features of SAS on the base code work fine. Then you can turn it into a macro with much more ease, because you won't have to be debugging the underlying code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595712#M171432</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-11T13:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595716#M171435</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279507"&gt;@braam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks. But can it be possible within one SAS code?&lt;BR /&gt;Second, do you know how I can let my SAS run just a part of the external code file (rather than the entire code)?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This all falls into the realm of "dynamic code", and that's what the macro language is for.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595716#M171435</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T13:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595717#M171436</link>
      <description>&lt;P&gt;You can not submit specific lines of code from external files using %include. I believe you can do something like this, though I have not tested it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options spool;

%let var= abc;
data test_&amp;amp;var.;
    a=1;
run;

%let var=def;
%include 4-6;

%let var=ghi;
%include 4-6;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595717#M171436</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-11T13:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595721#M171439</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yout can not submit specific lines of code from external files using %include. I believe you can do something like this, though I have not tested it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options spool;

%let var= abc;
data test_&amp;amp;var.;
    a=1;
run;

%let var=def;
%include 4-6;

%let var=ghi;
%include 4-6;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suppose this works, but it's not very clear code to anyone looking at this, it reminds me of Excel references; and don't ever change the code so that lines 4-6 move up or down in the code, because then you also have to change all of the %include statements.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595721#M171439</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-11T13:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595723#M171442</link>
      <description>&lt;P&gt;Why do you care what colors the editor is using?&amp;nbsp; SAS does not see the colors.&amp;nbsp; Just the text.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595723#M171442</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-11T13:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595724#M171443</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;I agree. A macro or Call execute logic is the answer here, this just popped up in my head since&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279507"&gt;@braam&lt;/a&gt;&amp;nbsp;asked if it is possible to execute parts of - and not the entire code from an external .sas file &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595724#M171443</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-11T13:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595725#M171444</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;Thanks. I actually tried code like this. But the thing is that the numbers following %include (4-6 in your example) are the line numbers in the log window, not in the code file, if I understood correctly. I'll try this way a little further. By the way, what do you mean by call execute? Could you give a little more hint?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;You are right. So, users have to be careful with that. Thanks for your answer as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595725#M171444</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T13:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595726#M171445</link>
      <description>&lt;P&gt;Just an alternative to creating dynamic code. Like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    do suffix='abc', 'def', 'ghi';
        call execute(cat(
           "data ", suffix, ";
               a=1;
           run;"
        ));
    end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can read more in the article&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/08/02/call-execute-for-sas-data-driven-programming/" target="_self"&gt;CALL EXECUTE made easy for SAS data-driven programming&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595726#M171445</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-11T13:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595740#M171456</link>
      <description>&lt;P&gt;Thanks. The link looks very helpful to me. I'll read this carefully today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fortunately, I've got a hint from one of the old posts:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Recalling-only-a-portion-of-data-lines-from-another-program/td-p/251212" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Recalling-only-a-portion-of-data-lines-from-another-program/td-p/251212&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
      infile '"C:\PATH\FILE1.sas"' firstobs= 108 obs=200;
      file '"C:\PATH\FILE2.sas"';
      input;
      put _infile_;
      run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on what I found in the posting, I made this code, which works for me.&amp;nbsp;In the posting, one mentioned that firstobs option can be replaced by something else more intuitive, user-friendly (A similar issue has already been discussed in this thread).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps I can add "BEGINNING" and "ENDING" tags in my file1 to indicate the first line and the ending line of the part I would like to take in file2. I'm just wondering if you know any way to solve this issue.&amp;nbsp; Thanks again for your advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595740#M171456</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T14:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595746#M171461</link>
      <description>&lt;P&gt;Add comment lines to your code that mark starts and ends. Then you can skip lines (no put) until a certain start comment is detected, and write lines until the corresponding end comment is found.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595746#M171461</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T14:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595826#M171484</link>
      <description>Sorry but, I don't know how to implement what you desribed...(skipping until the start comment is detected...) Could you please give me some hints or example codes?</description>
      <pubDate>Fri, 11 Oct 2019 17:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595826#M171484</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T17:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595834#M171486</link>
      <description>&lt;P&gt;Suppose you have a main.sas program like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* some steps */

/* start block 1 */

/* steps you want to selectively run */

/* end block 1 */

/* rest of code */
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;now run this step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "main.sas";
file "select.sas";
retain flag 0;
input;
if index(_infile_,"start block 1") then flag = 1;
if index(_infile_,"end block 1") then flag = 0;
if flag then put _infile_;
run;

%include "select.sas";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2019 17:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595834#M171486</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T17:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595866#M171493</link>
      <description>That works for me perfectly. Thanks a lot.</description>
      <pubDate>Fri, 11 Oct 2019 19:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595866#M171493</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-10-11T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595900#M171508</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279507"&gt;@braam&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;In the SAS days of yore, this kind of functionality was served with so-called old-style macros. Basically, they work similarly to %include, but instead of pointing to an external program file, you call a piece of the program identified by the old-style macro name. Needless to say, these things still work (note that the old-style macro names are limited to 8 characters, plus there're other limitations). For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option macrogen ;                                                                                                                       
                                                                                                                                        
macro MAIN ;                                                                                                                            
data new ;                                                                                                                              
  set &amp;amp;data ;                                                                                                                           
run ;                                                                                                                                   
%                                                                                                                                       
                                                                                                                                        
%let data = sashelp.class ;                                                                                                             
                                                                                                                                        
MAIN                                                                                                                                    
                                                                                                                                        
%let data = sashelp.cars ;                                                                                                              
                                                                                                                                        
MAIN                 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's what you see in the log:&lt;/P&gt;
&lt;PRE&gt;1820  macro MAIN ;
1821  data new ;
1822    set &amp;amp;data ;
1823  run ;
1824  %
1825
1826  %let data = sashelp.class ;
1827
1828  MAIN
NOTE: The old-style macro MAIN is beginning resolution.
1829 + ;
1830 +data new ;
1831 +  set &amp;amp;data ;
1832 +run ;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.NEW has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds

NOTE: The old-style macro MAIN is ending resolution.
1833
1834  %let data = sashelp.cars ;
1835
1836  MAIN
NOTE: The old-style macro MAIN is beginning resolution.
1837 + ;
1838 +data new ;
1839 +  set &amp;amp;data ;
1840 +run ;

NOTE: There were 428 observations read from the data set SASHELP.CARS.
NOTE: The data set WORK.NEW has 428 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds

NOTE: The old-style macro MAIN is ending resolution.
&lt;/PRE&gt;
&lt;P&gt;he MACROGEN option causes the appearance of the "+" lines in the log; basically, it's like using SOURCE2 with %include. Its advantage over MPRINT is that if you have a run-time error, the log will point to the actual line where it occurred rather than at the line where the macro was invoked (as with the current-style macros). Another advantage is that DATA steps with CARDS (LINES, DATALINES) are also acceptable. Essentially an old-style macro is nothing but copy-and-paste.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 21:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595900#M171508</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-10-11T21:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595904#M171509</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/21262"&gt;@hashman&lt;/a&gt; - Gee, this is bringing back memories!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 21:55:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595904#M171509</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-11T21:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a specific part of code without using macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595933#M171521</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;- Sure does! But am not sure at all how many folks here percentage-wise can still claim it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2019 01:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-I-run-a-specific-part-of-code-without-using-macro/m-p/595933#M171521</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-10-12T01:09:20Z</dc:date>
    </item>
  </channel>
</rss>

