<?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: Hi preventing parallel processing for a program treating open dataset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757055#M1115650</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;I too faced a similar situation and this is what I implemented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever your programs starts processing a particular AL11 File, Create a New Flag File in the Same Directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say if my file name is usr\bin\ABC.DAT, before OPEN DATASET command on this file, I would create a new file usr\bin\ABC.DAT.FLAG!!!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the processing ABC.DAT is done, I delete the Flag File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the mean time, If some other program, (or for that matter the same program) executes in a different session and tries to open the same file, we can check for the existence of the FLAG FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK for the Existence of FLAG FILE.&lt;/P&gt;&lt;P&gt;If FLAG FILE Exists, STOP. " another session is processing it.&lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt; CREATE FLAG FILE. &lt;/P&gt;&lt;P&gt; OPEN DATASET, and rest others.&lt;/P&gt;&lt;P&gt; CLOSE DATASET.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2008 03:05:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-10T03:05:17Z</dc:date>
    <item>
      <title>Hi preventing parallel processing for a program treating open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757053#M1115648</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;Has anyone come into a situation where he had to do an inbound interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(i.e using open dataset by scanning all the file in AL11)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do you treat program running in parallel in this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i mean is that if the same program is doing an open dataset and treating the same file in al11.  Then inconsistencies may occur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to lock a program that is running that is triggering an error message "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 18:24:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757053#M1115648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hi preventing parallel processing for a program treating open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757054#M1115649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;look at Rich's reply in this [thread.|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1106901"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 18:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757054#M1115649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T18:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hi preventing parallel processing for a program treating open dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757055#M1115650</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;I too faced a similar situation and this is what I implemented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever your programs starts processing a particular AL11 File, Create a New Flag File in the Same Directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say if my file name is usr\bin\ABC.DAT, before OPEN DATASET command on this file, I would create a new file usr\bin\ABC.DAT.FLAG!!!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the processing ABC.DAT is done, I delete the Flag File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the mean time, If some other program, (or for that matter the same program) executes in a different session and tries to open the same file, we can check for the existence of the FLAG FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK for the Existence of FLAG FILE.&lt;/P&gt;&lt;P&gt;If FLAG FILE Exists, STOP. " another session is processing it.&lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt; CREATE FLAG FILE. &lt;/P&gt;&lt;P&gt; OPEN DATASET, and rest others.&lt;/P&gt;&lt;P&gt; CLOSE DATASET.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 03:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-preventing-parallel-processing-for-a-program-treating-open-dataset/m-p/4757055#M1115650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T03:05:17Z</dc:date>
    </item>
  </channel>
</rss>

