<?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: In DIS, could we execution some jobs or some steps within a job conditionally? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/In-DIS-could-we-execution-some-jobs-or-some-steps-within-a-job/m-p/104269#M258382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conditional execution of jobs is normally done via scheduler. LSF for example allows for such conditional job execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have always the option to wrap a job into a macro using job pre- and post-code.&lt;/P&gt;&lt;P&gt;In the pre-code section you have then something like "%macro MyMacro; %if &amp;lt;expression&amp;gt; %then %do;", and in the post-code you have something like "%end; %mend; %MyMacro;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do the same in the pre- and post-code of any node as well. If you want several nodes wrapped into such a macro then I probably would use separate user written code nodes to define the macro for clarity. But you could also just use the pre-code of the first node and the post-code of the last node to set this up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what happens if you feed an empty table to the teradata table loader. I would assume if the table is empty then no loading happens so may be you even don't have to care about conditional processing (but of course if it's a replace load then the target table would still get truncated).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2013 00:00:03 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2013-08-08T00:00:03Z</dc:date>
    <item>
      <title>In DIS, could we execution some jobs or some steps within a job conditionally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-DIS-could-we-execution-some-jobs-or-some-steps-within-a-job/m-p/104268#M258381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;For example, if the SAS data set is empty, then it skips the fast load to Teradata table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 20:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-DIS-could-we-execution-some-jobs-or-some-steps-within-a-job/m-p/104268#M258381</guid>
      <dc:creator>ASASProgrammer</dc:creator>
      <dc:date>2013-08-07T20:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: In DIS, could we execution some jobs or some steps within a job conditionally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-DIS-could-we-execution-some-jobs-or-some-steps-within-a-job/m-p/104269#M258382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conditional execution of jobs is normally done via scheduler. LSF for example allows for such conditional job execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have always the option to wrap a job into a macro using job pre- and post-code.&lt;/P&gt;&lt;P&gt;In the pre-code section you have then something like "%macro MyMacro; %if &amp;lt;expression&amp;gt; %then %do;", and in the post-code you have something like "%end; %mend; %MyMacro;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do the same in the pre- and post-code of any node as well. If you want several nodes wrapped into such a macro then I probably would use separate user written code nodes to define the macro for clarity. But you could also just use the pre-code of the first node and the post-code of the last node to set this up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what happens if you feed an empty table to the teradata table loader. I would assume if the table is empty then no loading happens so may be you even don't have to care about conditional processing (but of course if it's a replace load then the target table would still get truncated).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 00:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-DIS-could-we-execution-some-jobs-or-some-steps-within-a-job/m-p/104269#M258382</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-08-08T00:00:03Z</dc:date>
    </item>
  </channel>
</rss>

