<?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: Cant' gett the lastest file using SFTP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882793#M348793</link>
    <description>&lt;P&gt;Hello again Tom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're right, with the truncover option, i'm getting all the files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juan R Gomez&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2023 13:25:19 GMT</pubDate>
    <dc:creator>radhames_gomez</dc:creator>
    <dc:date>2023-06-28T13:25:19Z</dc:date>
    <item>
      <title>Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882705#M348739</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm connecting throught SFTP to a server using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename fileList sftp '/init/folder/' host="hostname.local" user="user" optionsx='-i "E:\SAS WORK\mykey.ppk" -pw "pass" ' lsa;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to get the list of all files in the folder, so i can read the lastest one.&amp;nbsp; But the problem is that the remote server contains 35 files&amp;nbsp; and i'm just getting 32.&amp;nbsp; When i connect through Filezilla to the same server with the same user i can see the 35 files.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;data Files;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;infile fileList ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;input fileName $255. ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How can i solve this issue, because my process has to look for the last file every one hour?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;best regards,.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Juan Radhamess&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 21:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882705#M348739</guid>
      <dc:creator>radhames_gomez</dc:creator>
      <dc:date>2023-06-27T21:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882724#M348752</link>
      <description>&lt;P&gt;It might help to show the names of some of the files your code doesn't find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF any of the files you didn't get happen to have names that start with a dot such as .xauthority then use the LS option instead of LSA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 00:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882724#M348752</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-28T00:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882784#M348786</link>
      <description>&lt;P&gt;The files are like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1DIARIOCAN.2023178.T060520.txt&lt;/P&gt;&lt;P&gt;1DIARIOCAN.2023178.T092530.txt&lt;/P&gt;&lt;P&gt;1DIARIOCAN.2023178.T110530.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i run the process at 12 pm, the data step only bring:&amp;nbsp; the first to files but the one at 11 am is left out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 12:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882784#M348786</guid>
      <dc:creator>radhames_gomez</dc:creator>
      <dc:date>2023-06-28T12:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882789#M348790</link>
      <description>&lt;P&gt;How are you reading the output generated by your FILELIST fileref?&lt;/P&gt;
&lt;P&gt;Show the data step that you used to read it as there are things that can make the data step skip lines in the file.&amp;nbsp; The most obvious one being not using the TRUNCOVER option on the INFILE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  input id string $100.;
cards;
1 abc
2 def
3 ghi
4 jkl
5 mno
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;74   data test;
75     input id string $100.;
76   cards;

NOTE: LOST CARD.
RULE:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
82         ;
id=5 string=  _ERROR_=1 _N_=3
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.TEST has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2023 13:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882789#M348790</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-28T13:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882790#M348791</link>
      <description>&lt;P&gt;Hello Tom,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&amp;nbsp; Here is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename fileList sftp '/init/folder/' host="hostname.local" user="user" optionsx='-i "E:\SAS WORK\mykey.ppk" -pw "pass" ' lsa;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Files;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; infile fileList ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;input fileName $255. ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juan R Gomez&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 13:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882790#M348791</guid>
      <dc:creator>radhames_gomez</dc:creator>
      <dc:date>2023-06-28T13:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cant' gett the lastest file using SFTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882793#M348793</link>
      <description>&lt;P&gt;Hello again Tom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're right, with the truncover option, i'm getting all the files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juan R Gomez&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 13:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cant-gett-the-lastest-file-using-SFTP/m-p/882793#M348793</guid>
      <dc:creator>radhames_gomez</dc:creator>
      <dc:date>2023-06-28T13:25:19Z</dc:date>
    </item>
  </channel>
</rss>

