<?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: Set ErrorMode=0 with Store command in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402121#M149657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a quick one, just from looking at this, you ALWAYS want to set error mode back to 1 after your done with it, or the script will always run&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2012 11:09:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-09T11:09:59Z</dc:date>
    <item>
      <title>Set ErrorMode=0 with Store command</title>
      <link>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402120#M149656</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;One of our environment has some problems with storing qvd files. 99.9% time STORE tablename INTO filename.qdv (qvd) works ok, but sometimes we get general script error and script just quits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put this kind of test/ looping and store table until it is succeeded, In Windows file explorer I put the Transactions.qvd file to "Read only" state,&lt;/P&gt;&lt;P&gt;just for simulating Storing problem. Becaus it is very hard to get a real storing problem with this kind of small sandbox testes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should be fixed in the next part of the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Harri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////&lt;/P&gt;&lt;P&gt;SET ErrorMode= 0;&lt;/P&gt;&lt;P&gt;STORE Transactions INTO Transactions.qvd (qvd); // First attempt And here script also ends, even with ErrorMode set to 0;&lt;/P&gt;&lt;P&gt;// If everthing went fine, the following will only iterate 5 taking very few time&lt;/P&gt;&lt;P&gt; FOR vAttemptNo = 1 TO 5 // Number of attempts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF ScriptError = 1 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SLEEP 10000; // 10 secs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT SCRIPT WHEN $(vAttemptNo) =&amp;gt; 5;&amp;nbsp; //exit out if storing has not succeeded after 1+4 times of trying&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE Transactions INTO Transactions .qvd (qvd); // another attempt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;////////////////////////////&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 05:47:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402120#M149656</guid>
      <dc:creator />
      <dc:date>2012-10-11T05:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set ErrorMode=0 with Store command</title>
      <link>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402121#M149657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a quick one, just from looking at this, you ALWAYS want to set error mode back to 1 after your done with it, or the script will always run&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 11:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402121#M149657</guid>
      <dc:creator />
      <dc:date>2012-11-09T11:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set ErrorMode=0 with Store command</title>
      <link>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402122#M149658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There appear to be some limitations with the ErrorMode=0 exception handling, in that, well... it doesn't handle exceptions! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see this idea - I have provided steps to reproduce with a locked file.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/ideas/3443" title="http://community.qlik.com/ideas/3443"&gt;http://community.qlik.com/ideas/3443&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Here is the description of the ErrorMode handling in from the manual, page 292:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;This variable determines what action is to be taken by QlikView when an error is encountered during script&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;execution. By default (&lt;/SPAN&gt;&lt;STRONG style="font-size: 10.0pt; font-family: TimesNewRomanPS-BoldMT;"&gt;ErrorMode=1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;) the script execution will halt and the user will be prompted for action&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;(non-batch mode). By setting &lt;/SPAN&gt;&lt;STRONG style="font-size: 10.0pt; font-family: TimesNewRomanPS-BoldMT;"&gt;ErrorMode =0 &lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT; background: yellow;"&gt;QlikView will simply ignore the failure and continue script&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT; background: yellow;"&gt;execution at the next script statement.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt; By setting &lt;/SPAN&gt;&lt;STRONG style="font-size: 10.0pt; font-family: TimesNewRomanPS-BoldMT;"&gt;ErrorMode =2 &lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;QlikView will trigger an "Execution of&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: TimesNewRomanPSMT;"&gt;script failed..." error message immediately on failure, without prompting the user for action beforehand.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clearly a bug to me, but according to QT support it is not, and an "idea" has to be created to get it fixed.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please vote for it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/ideas/3443" title="http://community.qlik.com/ideas/3443"&gt;http://community.qlik.com/ideas/3443&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2014 15:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-ErrorMode-0-with-Store-command/m-p/402122#M149658</guid>
      <dc:creator />
      <dc:date>2014-06-03T15:01:28Z</dc:date>
    </item>
  </channel>
</rss>

