<?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: Reading and extracting data from large files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266631#M52598</link>
    <description>&lt;P&gt;It looks like it is a XML file . Try XMLV2 engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x xmlv2 '/folders/myfolders/xx.xml' automap=replace xmlmap='/folders/myfolders/xx.map';&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Apr 2016 07:12:10 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-04-27T07:12:10Z</dc:date>
    <item>
      <title>Reading and extracting data from large files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266630#M52597</link>
      <description>&lt;P&gt;I have a file that are extreamly large. Larger the 32.000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need SAS to read it, and the way i want it to do so is, that I expect to infile the first 32.000 bytes fine my tang &amp;lt;tag01&amp;gt; Then&amp;nbsp;I will extract a new subset of the file starting&amp;nbsp;with&amp;nbsp;&amp;lt;tag01&amp;gt; and extracting to &amp;lt;tag02&amp;gt;, thereafter extract form &amp;lt;tag02&amp;gt; to &amp;lt;tag03&amp;gt; and so forth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thereafter I will drop som of the extracted segments and rebuild the file again. What I will leave out is some databloks, that are extreamly large, and when I rebuild the file the size is less the 32000.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 06:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266630#M52597</guid>
      <dc:creator>Jacob1602</dc:creator>
      <dc:date>2016-04-27T06:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and extracting data from large files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266631#M52598</link>
      <description>&lt;P&gt;It looks like it is a XML file . Try XMLV2 engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x xmlv2 '/folders/myfolders/xx.xml' automap=replace xmlmap='/folders/myfolders/xx.map';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Apr 2016 07:12:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266631#M52598</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-27T07:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and extracting data from large files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266643#M52600</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp﻿&lt;/a&gt;&amp;nbsp;has stated it sounds like you are working with XML files. &amp;nbsp;I would not recommend you try to read and modify these yourself, you can use the libname as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp﻿&lt;/a&gt;&amp;nbsp;has provided, and for more complex XML then the XML Mapper. &amp;nbsp;However to properly work with XML data you would be far better off using software built to work with XML. &amp;nbsp;There are plenty of paid/free ones out there:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Comparison_of_XML_editors" target="_blank"&gt;https://en.wikipedia.org/wiki/Comparison_of_XML_editors&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;XMLFox springs to mind. &amp;nbsp;These allow you to alter/query/update XML files as if they were a database, i.e. searhing for tags, removing blocks etc.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 08:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266643#M52600</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-04-27T08:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and extracting data from large files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266667#M52608</link>
      <description>&lt;P&gt;Thanks for the advise, and you are totally right, it is a xml file. The problem is, that the file is to big for the SAS xml engine due to very big tatabloks. Therefore I will recuce the xml file by extracting the databloks and inserting a surogat-key instead. Thereby, when I read the xml file, I have a perfect dimensional model, with the databolks as my fact and the other datasets from the xml as my dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are an organisation that is very SAS centric, therefore&amp;nbsp;I will prefere to stick to SAS code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266667#M52608</guid>
      <dc:creator>Jacob1602</dc:creator>
      <dc:date>2016-04-27T09:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and extracting data from large files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266885#M52699</link>
      <description>It is NOT good for hard coding . If your XML is quite simple, you don't need too much code. But it is complicated ,I am afraid that would be very hard for SAS coding .</description>
      <pubDate>Thu, 28 Apr 2016 00:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-and-extracting-data-from-large-files/m-p/266885#M52699</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-28T00:58:41Z</dc:date>
    </item>
  </channel>
</rss>

