<?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: Conditionally skipping to the end of a macro called by a DO loop in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601176#M16685</link>
    <description>&lt;P&gt;Thanks for the fast reply.&amp;nbsp; I completely understand the second part.&amp;nbsp; Its creating the "condition met" as a 0 or 1 that is the stumbling block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the condition met logic for the variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if bluneconomic&amp;lt;0 and blironore&amp;gt;0 and blscrap&amp;gt;0 and blixrate&amp;lt;0 and blgfcf&amp;lt;0 and blalum&amp;lt;0 and bluneconomica&amp;lt;.05 and blironorea&amp;lt;.05 and blscrapa&amp;lt;.05 and blixratea&amp;lt;.05 and blgfcfa&amp;gt;.05 and blaluma&amp;lt;.05&lt;/P&gt;</description>
    <pubDate>Sat, 02 Nov 2019 21:42:04 GMT</pubDate>
    <dc:creator>mfp</dc:creator>
    <dc:date>2019-11-02T21:42:04Z</dc:date>
    <item>
      <title>Conditionally skipping to the end of a macro called by a DO loop</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601167#M16682</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a do loop that calls a macro and runs a series of 13 data procedures before ending the loop.&amp;nbsp; Early on, at data step 7, I would know whether a series of variables within the dataset created in that step have certain values.&amp;nbsp; There is a single observation in the dataset.&amp;nbsp; To save time, I want to evaluate the variable's values and, if they fail to meet certain conditions, I want to end the macro and skip to the next iteration of the loop.&amp;nbsp; However, If the conditions are met, I want to finish the macro's remaining steps and go to the next iteration of the loop.&amp;nbsp; What is the best way to accomplish that?&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 20:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601167#M16682</guid>
      <dc:creator>mfp</dc:creator>
      <dc:date>2019-11-02T20:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally skipping to the end of a macro called by a DO loop</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601174#M16684</link>
      <description>&lt;P&gt;In a data step where you having this single observation, and you do the evaluation of whether or not the conditions are met, create a 0 or 1 variable named condition_met, then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('condition_met',condition met);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This creates a macro variable &amp;amp;CONDITION_MET, then in your macro&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if &amp;amp;condition_met %then %do;
     /* Remaining steps of the macro */
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601174#M16684</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-02T21:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally skipping to the end of a macro called by a DO loop</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601176#M16685</link>
      <description>&lt;P&gt;Thanks for the fast reply.&amp;nbsp; I completely understand the second part.&amp;nbsp; Its creating the "condition met" as a 0 or 1 that is the stumbling block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the condition met logic for the variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if bluneconomic&amp;lt;0 and blironore&amp;gt;0 and blscrap&amp;gt;0 and blixrate&amp;lt;0 and blgfcf&amp;lt;0 and blalum&amp;lt;0 and bluneconomica&amp;lt;.05 and blironorea&amp;lt;.05 and blscrapa&amp;lt;.05 and blixratea&amp;lt;.05 and blgfcfa&amp;gt;.05 and blaluma&amp;lt;.05&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601176#M16685</guid>
      <dc:creator>mfp</dc:creator>
      <dc:date>2019-11-02T21:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally skipping to the end of a macro called by a DO loop</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601179#M16686</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('condition_met',bluneconomic&amp;lt;0 and blironore&amp;gt;0 and 
    blscrap&amp;gt;0 and blixrate&amp;lt;0 and blgfcf&amp;lt;0 and blalum&amp;lt;0 and
    bluneconomica&amp;lt;.05 and blironorea&amp;lt;.05 and blscrapa&amp;lt;.05 and 
    blixratea&amp;lt;.05 and blgfcfa&amp;gt;.05 and blaluma&amp;lt;.05);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Conditionally-skipping-to-the-end-of-a-macro-called-by-a-DO-loop/m-p/601179#M16686</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-02T21:57:33Z</dc:date>
    </item>
  </channel>
</rss>

