<?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: How to avoid trigger subsequent DI job if source files are not there? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762541#M20056</link>
    <description>&lt;P&gt;At our site we have actually done this.&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&amp;nbsp;suggests, we have used the scheduling plugin in SAs Management Console (SMC) to make job flows of individual SAS DI Studio deployed jobs.&lt;/P&gt;
&lt;P&gt;At the beginning of some flows we have a SAS job that checks input file availability. If the file(s) is/are not there, we abort the job (set an RC &amp;gt; 1). If you have set up the dependencies correctly in SMC the job flow script will abort as well, hence preventing subsequent jobs to be triggered.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 13:52:54 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2021-08-19T13:52:54Z</dc:date>
    <item>
      <title>How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754719#M20033</link>
      <description>I have a single flow with many DI jobs inside such as flow A has job1, job2.... to job100. I want to add an extra DI job at the start of the flow to check existence of some flat files. The flow is being scheduled to run on daily basis. If the flat source file does exist then I want to kick off the flow1 otherwise I want to abort the entire process without running any jobs in the flow. Should I use abort after checking the file existence? Will abort generate any error message? I do not want to see error message because it is normal we don’t get the source file on daily basis.</description>
      <pubDate>Sat, 17 Jul 2021 08:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754719#M20033</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-07-17T08:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754721#M20034</link>
      <description>&lt;P&gt;If I understand this correctly then you've got a master DIS job and then dragged a lot of other DIS jobs into this job. If so then that's something I'd consider o.k. during development for "unit" testing but not as production worthy.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In having such a master DIS job all your code will execute in a single SAS session (with risk of "overspill") and you also can't execute jobs in parallel unless you then also wrap a loop transform around such jobs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you describe should be done via a scheduler which can execute job flows conditionally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF really everything is in a single DIS job then you can always use the conditional execution transformation for what you describe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jul 2021 09:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754721#M20034</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-17T09:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754722#M20035</link>
      <description>Hi what do you mean by DIS? The flow is create in SAS management console for scheduling. The flow can contain multiple DI jobs.</description>
      <pubDate>Sat, 17 Jul 2021 09:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754722#M20035</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-07-17T09:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754807#M20036</link>
      <description>&lt;P&gt;And which Scheduling Server are you using? Capabilities differ so need to know.&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/bicdc/9.4/scheduleug/p0e2328k5bi682n0zmbxhga41qq5.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/bicdc/9.4/scheduleug/p0e2328k5bi682n0zmbxhga41qq5.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1626570914597.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61324i471F412C8A126E9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1626570914597.png" alt="Patrick_0-1626570914597.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/bicdc/9.4/scheduleug/p0debu4wfb11ion1l9fhw1sgrtfq.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/bicdc/9.4/scheduleug/p0debu4wfb11ion1l9fhw1sgrtfq.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1626571319059.png" style="width: 896px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61325iB4DFA43AC3AC4D08/image-dimensions/896x243?v=v2" width="896" height="243" role="button" title="Patrick_0-1626571319059.png" alt="Patrick_0-1626571319059.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 01:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754807#M20036</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-18T01:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754811#M20037</link>
      <description>&lt;P&gt;I use operating system for scheduling.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 01:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754811#M20037</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-07-18T01:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754891#M20038</link>
      <description>&lt;P&gt;If you use OS Scheduling then it will depend on your environment and the OS scheduler like cron or task manager what and how you need to implement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1626649100292.png" style="width: 927px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61347i7D53DBBDB6EBE724/image-dimensions/927x144?v=v2" width="927" height="144" role="button" title="Patrick_1-1626649100292.png" alt="Patrick_1-1626649100292.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you follow the link from&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/bicdc/9.4/scheduleug/n0kqax8khkl3hjn0zp0pc7fpn5ne.htm" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;for your OS you'll see that it's in the end a script that issues your .sas programs. I guess you could manually modify this script to check for existence of this external file and then only execute the other batch calls if the file exists (wrapped into some if..then...else logic). The check for the file would be using the scripting language like vbs or sh (whatever your OS is).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your initial idea to have a DIS job checking for existence of the file and then eventually not execute the other jobs wouldn't work because the batch script will call each .sas file (DIS job) individually as a child process. The batch script is the parent so only if a .sas file child execution ends with errors passed back to the parent process the .sas jobs later down the track wouldn't get executed. But that would lead to your master script ending with error which is not really the right thing to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 23:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/754891#M20038</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-18T23:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762541#M20056</link>
      <description>&lt;P&gt;At our site we have actually done this.&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&amp;nbsp;suggests, we have used the scheduling plugin in SAs Management Console (SMC) to make job flows of individual SAS DI Studio deployed jobs.&lt;/P&gt;
&lt;P&gt;At the beginning of some flows we have a SAS job that checks input file availability. If the file(s) is/are not there, we abort the job (set an RC &amp;gt; 1). If you have set up the dependencies correctly in SMC the job flow script will abort as well, hence preventing subsequent jobs to be triggered.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 13:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762541#M20056</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-08-19T13:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762550#M20057</link>
      <description>&lt;P&gt;the scheduler we have is via operating system. It does not let you set up checking file existence and trigger subsequent jobs.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762550#M20057</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-08-19T14:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid trigger subsequent DI job if source files are not there?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762551#M20058</link>
      <description>&lt;P&gt;That is what I have done. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-avoid-trigger-subsequent-DI-job-if-source-files-are-not/m-p/762551#M20058</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-08-19T14:22:29Z</dc:date>
    </item>
  </channel>
</rss>

