<?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: How to save a XML file in a local file using X statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278946#M56172</link>
    <description>&lt;P&gt;What happens when you run the command:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token string"&gt;curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From the command prompt? &amp;nbsp;Its likely you, or the place where SAS is installed is missing a permission, or the location. &amp;nbsp;You can try:&lt;/P&gt;
&lt;PRE&gt;filename tmp pipe 'curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml';

data test;
  length buff $2000;
  infile tmp dlm="¬";
  input buff $;
run;
  &lt;/PRE&gt;
&lt;P&gt;That should get the messages back from the system. &amp;nbsp;Maybe there is no path like that on C: (which is where SAS is installed not necessarily your local machine) or maybe you (or the SAS install) doesn't have permission to access that https site.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2016 08:46:12 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-06-21T08:46:12Z</dc:date>
    <item>
      <title>How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278941#M56168</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the code below to generate the XML file from API and I want to save it to&amp;nbsp;C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml as an xml file. But after the execution the windows explorer of the path just popping up and no file was created&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know what is the best way to save the xml file in my computer?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x "curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 08:24:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278941#M56168</guid>
      <dc:creator>jei</dc:creator>
      <dc:date>2016-06-21T08:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278946#M56172</link>
      <description>&lt;P&gt;What happens when you run the command:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token string"&gt;curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From the command prompt? &amp;nbsp;Its likely you, or the place where SAS is installed is missing a permission, or the location. &amp;nbsp;You can try:&lt;/P&gt;
&lt;PRE&gt;filename tmp pipe 'curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml';

data test;
  length buff $2000;
  infile tmp dlm="¬";
  input buff $;
run;
  &lt;/PRE&gt;
&lt;P&gt;That should get the messages back from the system. &amp;nbsp;Maybe there is no path like that on C: (which is where SAS is installed not necessarily your local machine) or maybe you (or the SAS install) doesn't have permission to access that https site.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 08:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278946#M56172</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-21T08:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278947#M56173</link>
      <description>&lt;P&gt;If you could run&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;x &lt;SPAN class="token string"&gt;"curl -k https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true &amp;gt; want.xml"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then &amp;nbsp;WANT.XML should be under the same &amp;nbsp;folder/directory with &lt;STRONG&gt;curl.exe&lt;/STRONG&gt; , Check Where CURL is installed .&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 08:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278947#M56173</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-21T08:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278956#M56176</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using the X statement, the command shows the exact details of the XML file. That is, we have a peermission to access the https. Do you know where I can check the SAS missing permission that you are saying?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, the log resulted 0 obs using the filename pipe as the image shows.&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3690i1170511D5D1E098C/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 09:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278956#M56176</guid>
      <dc:creator>jei</dc:creator>
      <dc:date>2016-06-21T09:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278958#M56177</link>
      <description>&lt;P&gt;I would check with your IT group. &amp;nbsp;It sounds like SAS is installed on a network, and may need to be given the same permissions as your local machine. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 09:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278958#M56177</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-21T09:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278960#M56179</link>
      <description>SAS was installed only on my local computer and have an Administration account.</description>
      <pubDate>Tue, 21 Jun 2016 09:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278960#M56179</guid>
      <dc:creator>jei</dc:creator>
      <dc:date>2016-06-21T09:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a XML file in a local file using X statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278962#M56180</link>
      <description>&lt;P&gt;Two other things you could try - turn xwait on:&lt;/P&gt;
&lt;P&gt;options xwait;&lt;/P&gt;
&lt;P&gt;Any OS window that opens will not close automatically, so you may see further information. &amp;nbsp;Also try running it from %sysexec:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000171045.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000171045.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And just to check again, if you goto the OS window, and run that command it does work? &amp;nbsp;It just seems strange as SAS local would just push the text out to the OS to run, so it should be exactly the same.&lt;/P&gt;
&lt;P&gt;Also, you have spaces inside the path (never recommended!) so you might need to quote the path (i have quoted both the https and path, try either if that doesn't work):&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;x '&lt;SPAN class="token string"&gt;curl -k "https://root:Tr3nd512345@rbc-svr-pi/webacs/api/v1/data/ClientDetails?.full=true" &amp;gt; "C:\Users\Desktop\Sample1\From URL\curl\savedfile.xml"'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 10:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-a-XML-file-in-a-local-file-using-X-statement/m-p/278962#M56180</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-21T10:00:18Z</dc:date>
    </item>
  </channel>
</rss>

