<?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: Rerun the middle section to end of the program before program finishes running in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148708#M29382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;divide you code into several parts storing the in segegrated locations.&lt;/P&gt;&lt;P&gt;Having the program run use the %include to call (bring the code) into running. Needed to run twice, do the %include twice. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2014 08:57:46 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-05-08T08:57:46Z</dc:date>
    <item>
      <title>Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148703#M29377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I want to run a program all the way through and before the program finishes running, have it rerun the middle section to the end of the program one more time, how would I do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 14:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148703#M29377</guid>
      <dc:creator>mcrum1</dc:creator>
      <dc:date>2014-05-07T14:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148704#M29378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Errrm, you can't.&amp;nbsp; Once a program is submitted then it runs through to the end.&amp;nbsp; You can cancel submitted programs.&amp;nbsp; Could you define in more detail why you would want to do this?&amp;nbsp; If the second half or your program needs to run twice, why not just pop a macro and mend around the code and call the macro twice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or highlight the first part of the code, execute that, then highlight the second part, run that, then submit it again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 14:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148704#M29378</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-07T14:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148705#M29379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Segoe UI','sans-serif'; color: #1a1a1a; font-size: 10pt;"&gt;A part of the program I run twice.&amp;nbsp; I run the program all the way through, then immediately rerun a section of the program. This corrects the underlying data due to errors people make when they make changes.&amp;nbsp; Errors include improper end dates (end dated before month end) or reassignments to other groups.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Segoe UI','sans-serif'; color: #1a1a1a; font-size: 10pt;"&gt;Hopefully I’m explaining this okay. I’m pretty new to this to using SAS.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 15:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148705#M29379</guid>
      <dc:creator>mcrum1</dc:creator>
      <dc:date>2014-05-07T15:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148706#M29380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, so you are doing some data cleaning, then some further operations on the clean data.&amp;nbsp; I would then suggest that you would be better served setting up a staging process for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raw Data -&amp;gt; Data Cleaning Checks -&amp;gt; Clean Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clean Data -&amp;gt; Output Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may find yourself having difficulties latter on with things changing, lack of audit trail etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can still do it in one program, just create temporary datasets:&lt;/P&gt;&lt;P&gt;data processed_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set raw_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do some edit checking/re-assignment;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report processed_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need further info or help, post some test data and the parts of your code you are re-running and we could suggest further items.&amp;nbsp; Am not in office now, so would be tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 17:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148706#M29380</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-07T17:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148707#M29381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helped.&amp;nbsp; Just to clarify what I meant by popping a macro/mend around the code which I didn't explain above.&amp;nbsp; Use something like the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* This code to run once */&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro Code_to_run_twice();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;%mend Code_to_run_twice;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Code_to_run_twice;&lt;/P&gt;&lt;P&gt;%Code_to_run_twice;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148707#M29381</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-08T08:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148708#M29382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;divide you code into several parts storing the in segegrated locations.&lt;/P&gt;&lt;P&gt;Having the program run use the %include to call (bring the code) into running. Needed to run twice, do the %include twice. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148708#M29382</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-08T08:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rerun the middle section to end of the program before program finishes running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148709#M29383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried both responses and they both worked. Just so I didn't have to divide the program I used the %macro %mend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you both!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 14:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerun-the-middle-section-to-end-of-the-program-before-program/m-p/148709#M29383</guid>
      <dc:creator>mcrum1</dc:creator>
      <dc:date>2014-05-13T14:30:59Z</dc:date>
    </item>
  </channel>
</rss>

