<?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 detect if a QVD file is used before store it? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395359#M423658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Great thread! Thansk you, it helps a lot!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Here is my tested and approved code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;//Code to use in Qlikview document where the QVD is in use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LockFile:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;fileUsed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;store LockFile into LockFile.txt(txt);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;drop table LockFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;FACT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * FROM fact.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LockFile:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;fileUsed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;store LockFile into LockFile.txt(txt);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;drop table LockFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;//Code to use in Qlikview document where the QVD is stored to test if the qvd is in use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;FACT:&lt;BR /&gt; LOAD * FROM fact.qvd (qvd);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; let flag = 0;&lt;BR /&gt; &lt;BR /&gt; LockFile:&lt;BR /&gt; LOAD fileUsed as currLock FROM LockFile.txt &lt;BR /&gt; (txt, utf8, embedded labels, delimiter is '\t', msq);&lt;BR /&gt; &lt;BR /&gt; let flag = peek('currLock');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; Do while peek('currLock') = 1 //file is in use. &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;// Waiting for 5 seconds and test again&lt;BR /&gt; sleep 5000;&lt;BR /&gt; LockFile:&lt;BR /&gt; LOAD fileUsed as currLock FROM LockFile.txt &lt;BR /&gt; (txt, utf8, embedded labels, delimiter is '\t', msq);&lt;BR /&gt; &lt;BR /&gt; loop;&lt;BR /&gt; &lt;BR /&gt; STORE test into d_fact.qvd; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Thanks &amp;amp; Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2017 14:45:26 GMT</pubDate>
    <dc:creator>sarafamiglietti</dc:creator>
    <dc:date>2017-12-05T14:45:26Z</dc:date>
    <item>
      <title>How to detect if a QVD file is used before store it?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395355#M423654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two Qlikview documents : &lt;/P&gt;&lt;P&gt;- 1 document that loads and stores my qvd files&lt;/P&gt;&lt;P&gt;- Another document &lt;SPAN style="font-size: 13.3333px;"&gt;that&lt;/SPAN&gt; uses this qvd files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But sometimes, there is a conflit because I try to store a qvd which is being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to detect if a qvd file is already used before to store it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395355#M423654</guid>
      <dc:creator>sarafamiglietti</dc:creator>
      <dc:date>2017-11-29T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect if a QVD file is used before store it?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395356#M423655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the Script, you can use the filetime() function to check if a file exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;if isnull(filetime('c:\file.txt')) then&lt;/P&gt;&lt;P&gt;//file doesnt exists&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;//file exists&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395356#M423655</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2017-11-29T13:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect if a QVD file is used before store it?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395357#M423656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to know if the file exists but if it is already in use when I try to store it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395357#M423656</guid>
      <dc:creator>sarafamiglietti</dc:creator>
      <dc:date>2017-11-29T13:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect if a QVD file is used before store it?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395358#M423657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry for that misunderstanding.&lt;/P&gt;&lt;P&gt;This thread could be helpful&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlikview.com/thread/52997" title="https://community.qlikview.com/thread/52997"&gt;ErrorMode = 0: File locked by another QlikView ... | Qlik Community&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 14:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395358#M423657</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2017-11-29T14:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect if a QVD file is used before store it?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395359#M423658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Great thread! Thansk you, it helps a lot!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Here is my tested and approved code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;//Code to use in Qlikview document where the QVD is in use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LockFile:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;fileUsed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;store LockFile into LockFile.txt(txt);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;drop table LockFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;FACT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * FROM fact.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LockFile:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;fileUsed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;store LockFile into LockFile.txt(txt);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;drop table LockFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;//Code to use in Qlikview document where the QVD is stored to test if the qvd is in use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;FACT:&lt;BR /&gt; LOAD * FROM fact.qvd (qvd);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; let flag = 0;&lt;BR /&gt; &lt;BR /&gt; LockFile:&lt;BR /&gt; LOAD fileUsed as currLock FROM LockFile.txt &lt;BR /&gt; (txt, utf8, embedded labels, delimiter is '\t', msq);&lt;BR /&gt; &lt;BR /&gt; let flag = peek('currLock');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; Do while peek('currLock') = 1 //file is in use. &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;// Waiting for 5 seconds and test again&lt;BR /&gt; sleep 5000;&lt;BR /&gt; LockFile:&lt;BR /&gt; LOAD fileUsed as currLock FROM LockFile.txt &lt;BR /&gt; (txt, utf8, embedded labels, delimiter is '\t', msq);&lt;BR /&gt; &lt;BR /&gt; loop;&lt;BR /&gt; &lt;BR /&gt; STORE test into d_fact.qvd; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Thanks &amp;amp; Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 14:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-detect-if-a-QVD-file-is-used-before-store-it/m-p/1395359#M423658</guid>
      <dc:creator>sarafamiglietti</dc:creator>
      <dc:date>2017-12-05T14:45:26Z</dc:date>
    </item>
  </channel>
</rss>

