<?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 Need help with the Syntax? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-the-Syntax/m-p/168547#M32358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to download a file to my network drive from a remote SFTP server through logging into WinSCP .&lt;/P&gt;&lt;P&gt;I am trying to use the following code and not sure sure if the syntax is correct, so any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let ftpfile_loc = &lt;A href="https://communities.sas.com/"&gt;\\User\folder1\files&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;%let dest = &lt;A href="https://communities.sas.com/"&gt;\\User\folder1\Dataout&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysexec "C:\WinsSCP\WinSCP.exe" /console /script:"&amp;amp;ftpfile_loc\ftpscript.txt" /command "get remotefile.prn &amp;amp;dest\localfile.prn" "close" "exit";&lt;/P&gt;&lt;P&gt;In the above code, is the get command syntax correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ftpscript.txt has the following code in it&lt;/P&gt;&lt;P&gt;option batch on&lt;/P&gt;&lt;P&gt;option confirm off&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;open s&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://communities.sas.com/ftp://user:password"&gt;ftp://user:password&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;@xx.x.xxx.xx.&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;22&lt;/A&gt;&lt;/P&gt;&lt;P&gt;cd /folder1/folder2//files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way of downloading the file from sftp server, plz let me know, because in the above code, i dont' know how to debug the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really running out of time on this, so help is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Eshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2013 02:30:35 GMT</pubDate>
    <dc:creator>Eshan</dc:creator>
    <dc:date>2013-12-10T02:30:35Z</dc:date>
    <item>
      <title>Need help with the Syntax?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-the-Syntax/m-p/168547#M32358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to download a file to my network drive from a remote SFTP server through logging into WinSCP .&lt;/P&gt;&lt;P&gt;I am trying to use the following code and not sure sure if the syntax is correct, so any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let ftpfile_loc = &lt;A href="https://communities.sas.com/"&gt;\\User\folder1\files&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;%let dest = &lt;A href="https://communities.sas.com/"&gt;\\User\folder1\Dataout&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysexec "C:\WinsSCP\WinSCP.exe" /console /script:"&amp;amp;ftpfile_loc\ftpscript.txt" /command "get remotefile.prn &amp;amp;dest\localfile.prn" "close" "exit";&lt;/P&gt;&lt;P&gt;In the above code, is the get command syntax correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ftpscript.txt has the following code in it&lt;/P&gt;&lt;P&gt;option batch on&lt;/P&gt;&lt;P&gt;option confirm off&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;open s&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://communities.sas.com/ftp://user:password"&gt;ftp://user:password&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;@xx.x.xxx.xx.&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;&lt;/A&gt;&lt;A href="mailto:password@xx.x.xxx.xx.22"&gt;22&lt;/A&gt;&lt;/P&gt;&lt;P&gt;cd /folder1/folder2//files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way of downloading the file from sftp server, plz let me know, because in the above code, i dont' know how to debug the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really running out of time on this, so help is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Eshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 02:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-the-Syntax/m-p/168547#M32358</guid>
      <dc:creator>Eshan</dc:creator>
      <dc:date>2013-12-10T02:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the Syntax?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-with-the-Syntax/m-p/168548#M32359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, is there a spcific reason to involve SAS in this process?&lt;/P&gt;&lt;P&gt;Second, there is SFTP access method for the FILENAME statement, don't know it will support your requirements, or if it's easier debug. But then you don't need to call external scripts from within SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 13:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-with-the-Syntax/m-p/168548#M32359</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-12-10T13:17:17Z</dc:date>
    </item>
  </channel>
</rss>

