<?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: Import XML File to Multiple SAS Datasets Without Re-Reading XML in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-XML-File-to-Multiple-SAS-Datasets-Without-Re-Reading-XML/m-p/297522#M312128</link>
    <description>&lt;P&gt;If you don't really need the 300 different tables, manually construct the xml map by drag and drop of items to create a single larger denormalised table.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2016 02:30:42 GMT</pubDate>
    <dc:creator>M2</dc:creator>
    <dc:date>2016-09-10T02:30:42Z</dc:date>
    <item>
      <title>Import XML File to Multiple SAS Datasets Without Re-Reading XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XML-File-to-Multiple-SAS-Datasets-Without-Re-Reading-XML/m-p/297437#M312127</link>
      <description>&lt;P&gt;We recieve data shipped to us as large complex XML files with an XML schema included. &amp;nbsp;Using the SAS XML Mapper 9.4 and the schema, I was able to use the "Auto Generate" process to create an XML Map (with auto generated keys) from the XML schema. &amp;nbsp;This resulted in the XML being divied up into over 300 tables. &amp;nbsp;I ran PROC COPY to pull all the tables into SAS... and it took about 2 days to finish. &amp;nbsp;I tried the same XML file and XML map and ran a DATA step for one table. &amp;nbsp;That step took a little more than 5 minutes. &amp;nbsp;It appears based on the log that for each table, SAS reads through the entire XML file again. &amp;nbsp;Is there a way to output to multiple SAS datasets with only one read through of the XML?&lt;/P&gt;
&lt;P&gt;--Shaun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code run on SAS 9.4 UNIX server:&lt;/P&gt;
&lt;P&gt;filename DataWare "/sas/data/LARGE.xml";&lt;BR /&gt;filename SXLEMAP "/sas/data/XML Maps/LARGE_AUTO.map";&lt;BR /&gt;libname DataWare xmlv2 xmlmap=SXLEMAP access=READONLY;&lt;BR /&gt;libname tempo "%sysfunc(getoption(WORK))";&lt;/P&gt;
&lt;P&gt;proc copy in=DataWare out=tempo;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 15:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XML-File-to-Multiple-SAS-Datasets-Without-Re-Reading-XML/m-p/297437#M312127</guid>
      <dc:creator>SNLFAM1</dc:creator>
      <dc:date>2016-09-09T15:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Import XML File to Multiple SAS Datasets Without Re-Reading XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XML-File-to-Multiple-SAS-Datasets-Without-Re-Reading-XML/m-p/297522#M312128</link>
      <description>&lt;P&gt;If you don't really need the 300 different tables, manually construct the xml map by drag and drop of items to create a single larger denormalised table.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 02:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XML-File-to-Multiple-SAS-Datasets-Without-Re-Reading-XML/m-p/297522#M312128</guid>
      <dc:creator>M2</dc:creator>
      <dc:date>2016-09-10T02:30:42Z</dc:date>
    </item>
  </channel>
</rss>

