<?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 SFTP Between Two SAS Environments? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314024#M68342</link>
    <description>&lt;P&gt;My preferred method of using the commandline is this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "sftp sourcefile targetfile 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

filename oscmd clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 redirects stderr (standard error output) to stdout, so you get any error messages into your infile. The data _null_ then executes the command and writes output to the SAS log.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 09:36:29 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-11-24T09:36:29Z</dc:date>
    <item>
      <title>How to SFTP Between Two SAS Environments?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314002#M68329</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SAS Dataset in one of my SAS Environment which I move it to another environment using SFTP in SAS Code.&lt;/P&gt;&lt;P&gt;I could do this by logging in to Linux box and then move it manually, but for a project I have to move this multiple times. Could you please assist me with sample code using which I could do the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both environments are on LINUX Hosts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 08:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314002#M68329</guid>
      <dc:creator>AnandVyas</dc:creator>
      <dc:date>2016-11-24T08:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to SFTP Between Two SAS Environments?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314011#M68333</link>
      <description>&lt;P&gt;Set up public/private key authentication between the users on both hosts. Then you can use sftp from the commandline without the need to log on.&lt;/P&gt;
&lt;P&gt;To use this from SAS code, you will need to have xcmd enabled, of course.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 09:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314011#M68333</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-24T09:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to SFTP Between Two SAS Environments?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314018#M68338</link>
      <description>&lt;P&gt;It's working fine with commandline, Could you please direct me to a sample code that I can use to do it from sas code(EG)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 09:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314018#M68338</guid>
      <dc:creator>AnandVyas</dc:creator>
      <dc:date>2016-11-24T09:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to SFTP Between Two SAS Environments?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314024#M68342</link>
      <description>&lt;P&gt;My preferred method of using the commandline is this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "sftp sourcefile targetfile 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

filename oscmd clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 redirects stderr (standard error output) to stdout, so you get any error messages into your infile. The data _null_ then executes the command and writes output to the SAS log.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 09:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314024#M68342</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-24T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to SFTP Between Two SAS Environments?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314045#M68347</link>
      <description>Thanks, this resolved the issue.</description>
      <pubDate>Thu, 24 Nov 2016 10:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SFTP-Between-Two-SAS-Environments/m-p/314045#M68347</guid>
      <dc:creator>AnandVyas</dc:creator>
      <dc:date>2016-11-24T10:25:30Z</dc:date>
    </item>
  </channel>
</rss>

