<?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: Direct my dataset to execute differently in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145775#M38765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use macro code to control which data steps are executed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Nov 2013 20:07:07 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-11-15T20:07:07Z</dc:date>
    <item>
      <title>Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145774#M38764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to find out how I can direct my SAS data step to act differently based on different conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: If in my dataset condition is&amp;nbsp; true then I want my program to not execute any other piece of code and instead&amp;nbsp; send me an email and if the condition is false then I want SAS to execute the remaining piece of code and not send me an email..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 19:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145774#M38764</guid>
      <dc:creator>path2success</dc:creator>
      <dc:date>2013-11-15T19:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145775#M38765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use macro code to control which data steps are executed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 20:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145775#M38765</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-11-15T20:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145776#M38766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm" title="http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm"&gt;SAS(R) 9.2 Companion for z/OS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above is about sending e-mails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that by dataset condition you mean like a property of a dataset and not a variable stored in a row of the dataset but it can technically result in similar approaches. It's difficult without more details about your SAS job but wrapping and nesting the job in a simple data step using if condition with a do block to send e-mail and then stop; statement and and else do block to call execute your wrapped code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are probably better solution depending at which point in your process you need to validate that condition whether its an all or nothing or a subtask, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't use these features much I'm just a methodologist with a keen interest in programming so I can't provide much more help without you providing far more details. Nonetheless, I hope the above gives you some ideas on how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 20:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145776#M38766</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-11-15T20:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145777#M38767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you need "Put Statement e-mail directives" .&amp;nbsp; A bit more detail about the exact process what help too.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/n0ig2krarrz6vtn1aw9zzvtez4qo.htm#n18opscluf3uvun1f0k1n2l3v2zb" title="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/n0ig2krarrz6vtn1aw9zzvtez4qo.htm#n18opscluf3uvun1f0k1n2l3v2zb"&gt;FILENAME Statement, EMAIL (SMTP) Access Method :: SAS(R) 9.4 Statements: Reference&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 21:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145777#M38767</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-11-15T21:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145778#M38768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;put your code in a macro and use a %if sentance , i recoment to create a macro to discribe you "true" condition (proc sql) lets assume you want to count a number of rows in the table and if the amount is more than X do a else do b.&lt;/P&gt;&lt;P&gt;for example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select count(*) into :mnobs1 from y.table;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if (&amp;amp;mnobs1.&amp;nbsp; &amp;gt; 10)&amp;nbsp;&amp;nbsp; %then %do;&lt;/P&gt;&lt;P&gt;(add you code for the first condition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%else %do;&lt;/P&gt;&lt;P&gt;(add you code for the seconed condition)&lt;/P&gt;&lt;P&gt; %end;&lt;/P&gt;&lt;P&gt; %mend; &lt;BR /&gt; &lt;BR /&gt; %test();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 08:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145778#M38768</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2013-11-18T08:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145779#M38769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to reading data_null_'s reference about how to send an email, you will also have to provide a little more detail on what should happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A data set condition can be true on one observation, and false on another.&amp;nbsp; In fact, it could be true on many observations, and false on many others.&amp;nbsp; What should happen?&amp;nbsp; How many emails do you want to receive?&amp;nbsp; Give us some idea of what you are checking as your "data set condition" and how you know whether it is true or false.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 14:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145779#M38769</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-11-18T14:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Direct my dataset to execute differently</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145780#M38770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/Using_Functions_SYSFUNC_and_IFC_to_conditionally_execute_statements_in_open_code" title="http://www.sascommunity.org/wiki/Using_Functions_SYSFUNC_and_IFC_to_conditionally_execute_statements_in_open_code"&gt;http://www.sascommunity.org/wiki/Using_Functions_SYSFUNC_and_IFC_to_conditionally_execute_statements_in_open_code&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. A macro is, yes, the first solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Here is the basic open-code syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysfunc(ifc(&amp;amp;condition&lt;/P&gt;&lt;P&gt;,%nrstr(*true;)&lt;/P&gt;&lt;P&gt;,%nrstr(*false;)&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron Fehd&amp;nbsp; sysfunc+ifc maven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 20:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Direct-my-dataset-to-execute-differently/m-p/145780#M38770</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2013-11-21T20:39:40Z</dc:date>
    </item>
  </channel>
</rss>

