<?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: Fastest way of Copying XML in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462275#M117670</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Servers are often not used to capacity but if that's a problem for you then limit the threads to something acceptable.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2018 06:51:06 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-05-15T06:51:06Z</dc:date>
    <item>
      <title>Fastest way of Importing XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462125#M117592</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having little trouble tuning a import process from XML to SAS.&lt;/P&gt;&lt;P&gt;I am using Linux System with SAS 9.4 Installed. I am using XML mapper 9.43 for interpretation of the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all XML tags we create tables and then sql join them using system generated ordinal columns to get the final table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using proc copy to import all the XML tags to SAS tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is in PROC COPY, as it is slow. In the log I can see following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INFO: Data set block I/O cannot be used because:
INFO: - The data sets use different engines, have different variables or have attributes that may differ.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So Basically there is no use in increasing buffer size or bufno.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please suggest any other practice that can boost the performance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I tried&amp;nbsp;COMPRESS=NO that did not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 04:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462125#M117592</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-05-15T04:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462134#M117597</link>
      <description>&lt;P&gt;What do you mean by copying XML? XML are text files really so a copy can be really easy if all you want is another physical copy, via FCOPY() function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do you mean import an XML file instead, ie read/parse an XML file to a SAS data set?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having little trouble tuning a copy process from XML to SAS.&lt;/P&gt;
&lt;P&gt;I am using Linux System with SAS 9.4 Installed. I am using XML mapper 9.43 for interpretation of the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However in the log I can see following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INFO: Data set block I/O cannot be used because:
INFO: - The data sets use different engines, have different variables or have attributes that may differ.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So Basically there is no use in increasing buffer size or bufno.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please suggest any other practice that can boost the performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: I tried&amp;nbsp;COMPRESS=NO that did not help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Satish&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 17:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462134#M117597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-14T17:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462250#M117652</link>
      <description>&lt;P&gt;I mean importing XML data using a mapper.(Question Edited)&lt;BR /&gt;I am using PROC COPY now, which should be efficient for this work, but as BLOCK IO is not in work it is slow.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 04:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462250#M117652</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-05-15T04:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462252#M117653</link>
      <description>&lt;P&gt;We probably need a lot more detail about the file to provide any specific advice.&lt;/P&gt;
&lt;P&gt;In general an XML file is not an efficient storage format, since it is normally very verbose. If you want speed do not use XML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to find a non-SAS utility that could convert the XML into a more usable format, like a simple CSV file, that SAS can read more efficiently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 04:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462252#M117653</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-05-15T04:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462257#M117657</link>
      <description>1. I can not change the input source from XML to other.&lt;BR /&gt;2. I can not change the existing architecture, my job is to tune the process.&lt;BR /&gt;I am reading thousands of XML part files one by one and then join them to single table and append all of them to get the final table for all those files.&lt;BR /&gt;&lt;BR /&gt;Out of all these steps proc copy which we use to copy data from XML into SAS is the slowest, due to row by row operation insted of Bulk IO.</description>
      <pubDate>Tue, 15 May 2018 04:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462257#M117657</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-05-15T04:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462260#M117660</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;O.K. So what you're doing is basically:&lt;/P&gt;
&lt;P&gt;1. You've got two libnames, one for your source and one for your target library.&lt;/P&gt;
&lt;P&gt;2. Your source library points to a folder containing XML files (and you're using the XMLV2 engine)&lt;/P&gt;
&lt;P&gt;3. You use Proc Copy to copy your data from source to target.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's most likely the bottleneck in this process is not the copy process as such but the parsing of the source XML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your current process reads, parses and copies one XML after the other (single threaded). If you want to speed up the process then change your code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a list of all XML files in the folder&lt;/P&gt;
&lt;P&gt;2. Point the source libname to a specific XML instead of the folder containing the XML (dynamic based on the list created)&lt;/P&gt;
&lt;P&gt;3. Implement parallel processing best via rsubmit on the same machine or if you don't have SAS/Connect licensed then via %SYSEXEC()&lt;/P&gt;
&lt;P&gt;4. Run the child processes in parallel (1 per XML to be converted to a SAS table)&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 05:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462260#M117660</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-05-15T05:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462261#M117661</link>
      <description>Thank you, I think this will be the only way.&lt;BR /&gt;I had tried all other options; none affecting the behavior any way.&lt;BR /&gt;I think the only disadvantage of the parallel run will be high IO and CPU consuption, that I will check. Thank you.</description>
      <pubDate>Tue, 15 May 2018 05:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462261#M117661</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-05-15T05:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fastest way of Copying XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462275#M117670</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Servers are often not used to capacity but if that's a problem for you then limit the threads to something acceptable.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 06:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fastest-way-of-Importing-XML/m-p/462275#M117670</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-05-15T06:51:06Z</dc:date>
    </item>
  </channel>
</rss>

