<?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: Need help to load flat files in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907654#M987128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2015 13:42:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-21T13:42:01Z</dc:date>
    <item>
      <title>Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907648#M987119</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 am getting data in flat file in the attached format so that data will come either in these two formats&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wed Jul 15 10:56:36 EDT 2015&lt;/P&gt;&lt;P&gt;Usage – 100%&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wed Jul 15 11:06:15 EDT 2015&lt;/P&gt;&lt;P&gt;The system ABCD down for 5 minutes&lt;/P&gt;&lt;P&gt;ABCD Usage&amp;nbsp; – 99.99%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the load script i want to load the timestamp , System name , duaration and usage % as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 351px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="159"&gt;Timestamp&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;System&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Duration&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Usage %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Jul 15 11:06:15 EDT 2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;ABCD&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;99.99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Jul 15 10:56:36 EDT 2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;ABCD&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 08:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907648#M987119</guid>
      <dc:creator />
      <dc:date>2015-07-21T08:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907649#M987121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first message, ABCD is not included. Is this to be assumed for all entries, or do you have other possible System?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 08:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907649#M987121</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-21T08:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907650#M987122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be assumed please refer the expected data xls which i have attached just now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 08:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907650#M987122</guid>
      <dc:creator />
      <dc:date>2015-07-21T08:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907651#M987124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First step is to load the raw data as fix files as that can manage data that spans several lines easily. They will concatenate into one table.&lt;/P&gt;&lt;P&gt;Each record will contain one log item of several lines, including CR characters (Chr(13)).&lt;/P&gt;&lt;P&gt;You will of course need to adjust the path:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;Directory;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Logs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;LOAD [@1:n] As Log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;[..\Downloads\Sample1.txt]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;(fix, codepage is 1252, record is 3 lines);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;LOAD [@1:n] As Log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;[..\Downloads\Sample2.txt]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;(fix, codepage is 1252, record is 3 lines);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;Then you need to parse the data into a new table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;Parsed:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; Mid(Log, 5, Index(Log, Chr(13)) - 5) As Timestamp,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; 'ABCD' As System,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; PurgeChar(Subfield(Log, 'Usage', 2), '% –') As Usage%,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; If(Index(Log,'minutes'),Subfield(SubField(Log, 'used for ', 2), ' minutes', 1), 0) As Duration&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;resident Logs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally, drop the raw table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;drop table Logs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 09:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907651#M987124</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-21T09:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907652#M987125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks i checked but it is not giving the timestamop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907652#M987125</guid>
      <dc:creator />
      <dc:date>2015-07-21T13:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907653#M987126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the result I get when loading the script using the sample files you provided.&lt;/P&gt;&lt;P&gt;Did you try with the same sample files?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did notice that there is a discrepancy between the sample written in your question, and the actual sample file you uploaded.&lt;/P&gt;&lt;P&gt;In the question it says "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The system ABCD down for 5 minutes&lt;/SPAN&gt;" while the sample file says "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The system ABCD used for 5 minutes&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-07-21_1518.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93496_2015-07-21_1518.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907653#M987126</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-21T13:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907654#M987128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907654#M987128</guid>
      <dc:creator />
      <dc:date>2015-07-21T13:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907655#M987130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/binodkumar_22"&gt;binodkumar_22&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get the solution, please close the thread. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907655#M987130</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-07-21T13:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to load flat files</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907656#M987131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! Please mark as Correct if you are satisfied with the answer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-to-load-flat-files/m-p/907656#M987131</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-21T13:50:46Z</dc:date>
    </item>
  </channel>
</rss>

