<?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: Code to move file from one FTP to another - change port in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787168#M251457</link>
    <description>&lt;P&gt;Check out the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0v0ijxl1k6d4bn16cshtic7u4i3.htm" target="_blank" rel="noopener"&gt;CONNPORT&lt;/A&gt; option on the FILENAME statement using FTP.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 21:08:53 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-12-22T21:08:53Z</dc:date>
    <item>
      <title>Code to move file from one FTP to another - change port</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787074#M251406</link>
      <description>&lt;P&gt;Tengo una macro en SAS que funcionaba perfectamente hasta hace unos días y me comentan en otros foros que puede ser por el puerto. SAS por defecto coge los puertos 21 y 22 y ahora deberia coger 11021 o 11022, ¿como puedo introducir en mi código el puerto?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro putftpfile (&lt;BR /&gt;server= ,/*Servidor FTP*/&lt;BR /&gt;user= ,/*Usuario del FTP*/&lt;BR /&gt;pass= ,/*Contraseña del FTP*/&lt;BR /&gt;path= ,/*Ruta del FTP*/&lt;BR /&gt;file= ,/*Nombre completo del fichero*/&lt;BR /&gt;inpath= /*Ruta en el servidor SAS*/&lt;BR /&gt;);&lt;BR /&gt;/* Abrimos la conexión con el FTP */&lt;BR /&gt;filename ftpcnx ftp "&amp;amp;file"&lt;BR /&gt;host="&amp;amp;server"&lt;BR /&gt;user="&amp;amp;user."&lt;BR /&gt;pass="&amp;amp;pass"&lt;BR /&gt;passive&lt;BR /&gt;cd="&amp;amp;path"&lt;BR /&gt;;&lt;BR /&gt;filename local "&amp;amp;inpath./&amp;amp;file";&lt;/P&gt;&lt;P&gt;/* Escribimos el fichero BINARIO en el la ruta FTP indicada */&lt;BR /&gt;data _NULL_;&lt;BR /&gt;infile local recfm=n;&lt;BR /&gt;input x $char1. @@;&lt;BR /&gt;file ftpcnx recfm=s;&lt;BR /&gt;put x $char1. @@;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%putftpfile (server=ftp.endesa.es,&amp;nbsp;&lt;BR /&gt;user=*****,&lt;BR /&gt;pass=*****,&lt;BR /&gt;path=\STIGA\Universo_B2C,&lt;BR /&gt;file=Prueba_Borrar.txt,&lt;BR /&gt;inpath=/sasdatos/calidad/SAS/RESULTADOS/211215);&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 09:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787074#M251406</guid>
      <dc:creator>T1n21</dc:creator>
      <dc:date>2021-12-22T09:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code to move file from one FTP to another - change port</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787075#M251407</link>
      <description>I have a macro in SAS that worked perfectly until a few days ago and I have been told in other forums that it may be because of the port. SAS by default takes ports 21 and 22 and now it should take 11021 or 11022, how can I enter the port in my code?</description>
      <pubDate>Wed, 22 Dec 2021 09:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787075#M251407</guid>
      <dc:creator>T1n21</dc:creator>
      <dc:date>2021-12-22T09:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Code to move file from one FTP to another - change port</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787168#M251457</link>
      <description>&lt;P&gt;Check out the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0v0ijxl1k6d4bn16cshtic7u4i3.htm" target="_blank" rel="noopener"&gt;CONNPORT&lt;/A&gt; option on the FILENAME statement using FTP.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 21:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787168#M251457</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-12-22T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Code to move file from one FTP to another - change port</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787193#M251471</link>
      <description>&lt;P&gt;Just tell SAS what PORT to use by using, wait for it, the PORT= option.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0v0ijxl1k6d4bn16cshtic7u4i3.htm" target="_blank" rel="noopener"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0v0ijxl1k6d4bn16cshtic7u4i3.htm&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ftpcnx ftp "&amp;amp;file"
  host="&amp;amp;server"
  user="&amp;amp;user."
  pass="&amp;amp;pass"
  passive
  cd="&amp;amp;path"
  port=11021
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should probably include it as a parameter to your macro.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro putftpfile 
(server= /* Servidor FTP */
,port=21 /* FTP Port nombre */
,user=   /* Usuario del FTP */
,pass=   /* Contraseña del FTP */
,path=   /* Ruta del FTP */
,file=   /* Nombre completo del fichero */
,inpath= /* Ruta en el servidor SAS */
);
...
  port=&amp;amp;port
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 04:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-move-file-from-one-FTP-to-another-change-port/m-p/787193#M251471</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-23T04:13:20Z</dc:date>
    </item>
  </channel>
</rss>

