<?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: Limit values for import of a XML file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643232#M191936</link>
    <description>&lt;P&gt;Use&amp;nbsp;&lt;STRONG&gt;options obs=10;&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;(or any other number) and check does it import the first 10 observation correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with a small number and if it results OK and fast enough change limitation&lt;/P&gt;
&lt;P&gt;to 10% of estimated observations. Check running elapse time and compute the estimated time for full run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the limitation of 10 observations takes a long time or finish with any errors please post (1) the full log (2) a sample of the xml file.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 10:38:01 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-04-27T10:38:01Z</dc:date>
    <item>
      <title>Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643224#M191933</link>
      <description>&lt;P&gt;Good morning!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to import a large xml file.&lt;/P&gt;&lt;P&gt;Therefore i checked this document&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings17/1318-2017.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings17/1318-2017.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and tried to use this code:&lt;/P&gt;&lt;PRE&gt;libname SGFXML xml "/folders/myfolders/cloud/drugbank_all_full_database/fulldatabase.xml";&lt;BR /&gt;libname DATA "C:\Documents\Data";&lt;BR /&gt;data data.dm;&lt;BR /&gt;set sgfxml.dm;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;Apparently everything was running fine, however running forever and did not finish the processing of the code (i let for a night), I am currently using my virtual box and sas university edition for windows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file is not that big 1.3 GB, i am not sure why it is taking so long to process, so what i was thinking is if there is a way to limit the importation rows so that it is faster. Does anybody knows how to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38790iC1442CDAE5FC3259/image-size/medium?v=v2&amp;amp;px=400" role="button" title="error.PNG" alt="error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643224#M191933</guid>
      <dc:creator>Debora1</dc:creator>
      <dc:date>2020-04-27T09:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643232#M191936</link>
      <description>&lt;P&gt;Use&amp;nbsp;&lt;STRONG&gt;options obs=10;&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;(or any other number) and check does it import the first 10 observation correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with a small number and if it results OK and fast enough change limitation&lt;/P&gt;
&lt;P&gt;to 10% of estimated observations. Check running elapse time and compute the estimated time for full run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the limitation of 10 observations takes a long time or finish with any errors please post (1) the full log (2) a sample of the xml file.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643232#M191936</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-27T10:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643244#M191943</link>
      <description>Did you try XMLV2 engine ?&lt;BR /&gt;&lt;BR /&gt;filename x temp;&lt;BR /&gt;libname SGFXML xmlv2 "/folders/myfolders/cloud/drugbank_all_full_database/fulldatabase.xml" automap=replace xmlmap=x ;&lt;BR /&gt;&lt;BR /&gt;proc copy in=SGFXML out=work noclone ;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:10:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643244#M191943</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-04-27T11:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643245#M191944</link>
      <description>Hello Shmuel,&lt;BR /&gt;thanks for the answer!&lt;BR /&gt;I tried, but still no end of compilation.&lt;BR /&gt;Of course, the file that i am trying to import is this one:&lt;BR /&gt;&lt;A href="https://www.drugbank.ca/releases/latest#full" target="_blank"&gt;https://www.drugbank.ca/releases/latest#full&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643245#M191944</guid>
      <dc:creator>Debora1</dc:creator>
      <dc:date>2020-04-27T11:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643257#M191950</link>
      <description>&lt;P&gt;Thanks Ksharp!&lt;BR /&gt;I have tried and the following errors appears:&lt;BR /&gt;I have checked the errors, but given my limited knowledge on SAS here is what i found:&lt;BR /&gt;1) ERROR: The creation of the XML Mapper file failed. ( &lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-import-XML-file-into-SAS/td-p/418527" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-import-XML-file-into-SAS/td-p/418527&lt;/A&gt;) and I am assuming i need the Microsoft® Windows® for x64 SAS XML Mapper (&lt;A href="https://support.sas.com/downloads/package.htm?pid=486#" target="_blank"&gt;https://support.sas.com/downloads/package.htm?pid=486#&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;I tried to open my xml file, but the following message appears:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38791i0347302EC48C0741/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e2.PNG" alt="e2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38793iD5D8B70AEA8F7796/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e1.PNG" alt="e1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e3.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38792iA3C61056E167E5D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e3.PNG" alt="e3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2) ERROR: Error in the LIBNAME statement.This one i am assuming is related to the previous erros (&lt;A href="https://communities.sas.com/t5/SAS-Data-Management/Error-in-SAS-import-connection-failed-error-in-libname-statement/td-p/212042" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Management/Error-in-SAS-import-connection-failed-error-in-libname-statement/td-p/212042&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;3) ERROR: Libref SGFXML is not assigned. This one i could not understand either.&lt;/P&gt;&lt;P&gt;The database that i am trying to import is this one:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.drugbank.ca/releases/latest#full" target="_blank"&gt;https://www.drugbank.ca/releases/latest#full&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;72&lt;BR /&gt;73 filename x temp;&lt;BR /&gt;74 libname SGFXML xmlv2 "/folders/myfolders/cloud/drugbank_all_full_database/fulldatabase.xml" automap=replace xmlmap=x ;&lt;BR /&gt;ERROR: The creation of the XML Mapper file failed.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;75&lt;BR /&gt;76 proc copy in=SGFXML out=work noclone ;&lt;BR /&gt;77 run;&lt;BR /&gt;&lt;BR /&gt;ERROR: Libref SGFXML is not assigned.&lt;BR /&gt;NOTE: Statements not processed because of errors noted above.&lt;BR /&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;BR /&gt;real time 0.18 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;78&lt;BR /&gt;79&lt;BR /&gt;80 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;92 "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643257#M191950</guid>
      <dc:creator>Debora1</dc:creator>
      <dc:date>2020-04-27T11:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643260#M191952</link>
      <description>Sorry. Maybe someone could help you .&lt;BR /&gt;The following code could check what is your xml file look like.&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt; infile '.........';&lt;BR /&gt; input;&lt;BR /&gt; put _infile_;&lt;BR /&gt; if _n_=100 then stop;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;p.s. if could ,write some sas code on your own to parse the xml file , OR resort to the third side software ?</description>
      <pubDate>Mon, 27 Apr 2020 12:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643260#M191952</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-04-27T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Limit values for import of a XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643266#M191957</link>
      <description>&lt;P&gt;I see that your xml file is from&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.drugbank.ca/releases/latest#full" target="_blank"&gt;https://www.drugbank.ca/releases/latest#full&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you download the file to your computer and read it from a local directory?&lt;/P&gt;
&lt;P&gt;What sas platform do you use?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limit-values-for-import-of-a-XML-file/m-p/643266#M191957</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-27T12:31:47Z</dc:date>
    </item>
  </channel>
</rss>

