<?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 Questions on using SFTP to get file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227733#M41058</link>
    <description>&lt;P&gt;Hi, I need to use SAS to get a .csv file using SFTP and load it into a table. I have the pub key and connection setup properly and able to get the file with the following statements. However, all data including the column header are in 1 column in the reciving table. How can I load the data into .csv file that get from the site and load it into a SAS dataset with first row as column header? I also need to rename the file after I read it. Is there anyway I can include some sftp command in my SAS script. Please advise...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Filename SITE1 SFTP "/data/NM_TEST_20150911.csv"&lt;BR /&gt; Host="142.172.162.252" user="r_test" ;&lt;/P&gt;
&lt;P&gt;Data temp;&lt;BR /&gt; infile site1 truncover;&lt;BR /&gt; input a $5000.;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2015 18:20:06 GMT</pubDate>
    <dc:creator>Dennis_Lam</dc:creator>
    <dc:date>2015-09-29T18:20:06Z</dc:date>
    <item>
      <title>Questions on using SFTP to get file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227733#M41058</link>
      <description>&lt;P&gt;Hi, I need to use SAS to get a .csv file using SFTP and load it into a table. I have the pub key and connection setup properly and able to get the file with the following statements. However, all data including the column header are in 1 column in the reciving table. How can I load the data into .csv file that get from the site and load it into a SAS dataset with first row as column header? I also need to rename the file after I read it. Is there anyway I can include some sftp command in my SAS script. Please advise...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Filename SITE1 SFTP "/data/NM_TEST_20150911.csv"&lt;BR /&gt; Host="142.172.162.252" user="r_test" ;&lt;/P&gt;
&lt;P&gt;Data temp;&lt;BR /&gt; infile site1 truncover;&lt;BR /&gt; input a $5000.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 18:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227733#M41058</guid>
      <dc:creator>Dennis_Lam</dc:creator>
      <dc:date>2015-09-29T18:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Questions on using SFTP to get file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227738#M41060</link>
      <description>&lt;P&gt;Since you say the file is a CSV, I'm assuming that there commas between the columns. Where are they placed in the file? Please provide a sample record of the data in the file.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 18:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227738#M41060</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-09-29T18:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Questions on using SFTP to get file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227748#M41063</link>
      <description>&lt;P&gt;If the filename statement works without problems you can use the data import wizard as a start indicating teh fileref SITE1 as the source and name the output, Library and dataset as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that works at all then the datastep code in the Log can be copied and modified to provide a bit more control of the resulting data set.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 19:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-on-using-SFTP-to-get-file/m-p/227748#M41063</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-29T19:47:29Z</dc:date>
    </item>
  </channel>
</rss>

