<?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 Error importing XML file with automap in SAS Viya in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555135#M342</link>
    <description>&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Hi there,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;I'm stuck with a piece of code that always worked on SAS 9.4. It should import a complex hierarchical XML file automatically to several SAS datasets. &lt;FONT style="background-color: #ffffff; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I can read the xml file in a datastep without any problems. But using the xmlv2 engine combined with automap option gives an error.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT style="background-color: #ffffff;"&gt;The code I'm trying is this;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xml_in filesrvc folderpath='/Users/myname/test/' filename='xml_in.xml';
filename xx_map temp;
 
libname xml_in xmlv2 xmlfileref=xml_in automap=replace xmlmap=xx_map; 
proc copy in=xml_in out=work;
run; quit;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;The error;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;ERROR: The AUTOMAP= option accesses files that are specified with either a physical location or associated with a fileref device type of DISK or TEMP only.&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;any ideas?&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;Cheers,&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;Frank&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE class="sasLog" id="pre_sasLog_1464" style="background-color: transparent; -webkit-user-select: text; -webkit-user-modify: read-only; -webkit-touch-callout: default; border-top-width: 0px; border-bottom-width: 0px;"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 30 Apr 2019 17:12:17 GMT</pubDate>
    <dc:creator>Frank_Boekamp</dc:creator>
    <dc:date>2019-04-30T17:12:17Z</dc:date>
    <item>
      <title>Error importing XML file with automap in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555135#M342</link>
      <description>&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Hi there,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;I'm stuck with a piece of code that always worked on SAS 9.4. It should import a complex hierarchical XML file automatically to several SAS datasets. &lt;FONT style="background-color: #ffffff; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I can read the xml file in a datastep without any problems. But using the xmlv2 engine combined with automap option gives an error.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT style="background-color: #ffffff;"&gt;The code I'm trying is this;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xml_in filesrvc folderpath='/Users/myname/test/' filename='xml_in.xml';
filename xx_map temp;
 
libname xml_in xmlv2 xmlfileref=xml_in automap=replace xmlmap=xx_map; 
proc copy in=xml_in out=work;
run; quit;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;The error;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;ERROR: The AUTOMAP= option accesses files that are specified with either a physical location or associated with a fileref device type of DISK or TEMP only.&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;any ideas?&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;Cheers,&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;Frank&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE class="sasLog" id="pre_sasLog_1464" style="background-color: transparent; -webkit-user-select: text; -webkit-user-modify: read-only; -webkit-touch-callout: default; border-top-width: 0px; border-bottom-width: 0px;"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555135#M342</guid>
      <dc:creator>Frank_Boekamp</dc:creator>
      <dc:date>2019-04-30T17:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error importing XML file with automap in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555143#M343</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37091"&gt;@Frank_Boekamp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You must specify the physical location of an existing XML document with either the complete pathname, filename, and file extension, or with a file reference that is associated with the physical location for the DISK or TEMP device type only. &lt;STRONG&gt;The XML document must exist on disk&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=engxml&amp;amp;docsetTarget=n1p6kbmn43fz0en1tajxf3y7karg.htm&amp;amp;locale=en#n0c6o9adth8kv4n1bp4jgizkv3x8" target="_self"&gt;AUTOMAP=&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555143#M343</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2019-04-30T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error importing XML file with automap in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555152#M344</link>
      <description>&lt;P&gt;Reading and writing XML is working fine using next code;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xml_in filesrvc folderpath='/Users/myname/test/' filename='xml_in.xml';
filename xml_out filesrvc folderpath='/Users/myname/test/' filename='xml_out.xml';

data test;
	length line $ 32676;;
	infile xml_in lrecl=32767;
	file xml_out_out;
	input line;
	put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using &amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 150%; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;complete pathname, filename, and file extension&lt;/SPAN&gt; in a filename statement seems not to work in SAS Viya.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm puzzled what to do with the libname statement with the automap option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xml_in xmlv2 xmlfileref=xml_in automap=replace xmlmap=xx_map; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Error-importing-XML-file-with-automap-in-SAS-Viya/m-p/555152#M344</guid>
      <dc:creator>Frank_Boekamp</dc:creator>
      <dc:date>2019-04-30T17:49:40Z</dc:date>
    </item>
  </channel>
</rss>

