<?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 Writing to existing mainframe file via FILENAME FTP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-existing-mainframe-file-via-FILENAME-FTP/m-p/143834#M297005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;II've scoured the internet for examples, but my team and I can't seem to get this done. I'm unfamiliar with mainframes, but the mainframe admin has supplied us what he says are valid values for the relevant dummy values below. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;FILENAME theFile FTP 'filenameOnMainframe' HOST=’hostname’ PORT=portnum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;LRECL=80 BLOCKSIZE=6160 USER=’USERNAME’ PASS='PASS'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;RECFM=F ENCODING=ASCII DEBUG RCMD='SITE CY PRI=15 SEC=50';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;DATA _&lt;EM&gt;NULL&lt;/EM&gt;_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILE theFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;PUT @1 'TEST';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;When I run the above, I get these errors:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: Open failed for file FTP1&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: The connection has timed out..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presuming my values are correct, any ideas on why this is not working? We've had success FTPing to, say, a shared drive. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Nov 2013 17:50:11 GMT</pubDate>
    <dc:creator>RgrWilliams</dc:creator>
    <dc:date>2013-11-14T17:50:11Z</dc:date>
    <item>
      <title>Writing to existing mainframe file via FILENAME FTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-existing-mainframe-file-via-FILENAME-FTP/m-p/143834#M297005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;II've scoured the internet for examples, but my team and I can't seem to get this done. I'm unfamiliar with mainframes, but the mainframe admin has supplied us what he says are valid values for the relevant dummy values below. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;FILENAME theFile FTP 'filenameOnMainframe' HOST=’hostname’ PORT=portnum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;LRECL=80 BLOCKSIZE=6160 USER=’USERNAME’ PASS='PASS'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;RECFM=F ENCODING=ASCII DEBUG RCMD='SITE CY PRI=15 SEC=50';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;DATA _&lt;EM&gt;NULL&lt;/EM&gt;_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILE theFile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;PUT @1 'TEST';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;When I run the above, I get these errors:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: Open failed for file FTP1&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: The connection has timed out..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presuming my values are correct, any ideas on why this is not working? We've had success FTPing to, say, a shared drive. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 17:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-existing-mainframe-file-via-FILENAME-FTP/m-p/143834#M297005</guid>
      <dc:creator>RgrWilliams</dc:creator>
      <dc:date>2013-11-14T17:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to existing mainframe file via FILENAME FTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-existing-mainframe-file-via-FILENAME-FTP/m-p/143835#M297006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would start first reading a Mainframe dataset. Just to check host-ip portnumber are not blocked by firewalls.&lt;/P&gt;&lt;P&gt;Possible start using ping&amp;nbsp; telnet (change to port 21/22 instead of 23) &lt;/P&gt;&lt;P&gt;The message is suggesting the partner is not reachable&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#p0v0ijxl1k6d4bn16cshtic7u4i3.htm"&gt;SAS(R) 9.4 Statements: Reference&lt;/A&gt; (filename)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rcmd should come form the mainframe guys as validated values. When not, you are giving command that are in error.&lt;BR /&gt;The port number is 21 (I believe) for old classic FTP, with encryption it 22 and indicated as SFTP. Logical/functions no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filename can be hierarchic (HFS like Unix) or classic 8.8.8. naming (z/os bound).&amp;nbsp; Both are controlled by RACF (ACF-2) for the authorisation.&lt;/P&gt;&lt;P&gt;The locking of the dataset is different. See the diiferences on that see DISP= options. In that case I would advice using a PDSE (existing-preallocated) and not coding lrecl/blksize).&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hosto390/64786/HTML/default/viewer.htm#n06xm17q99z0x6n1tskpswfrgp27.htm" title="http://support.sas.com/documentation/cdl/en/hosto390/64786/HTML/default/viewer.htm#n06xm17q99z0x6n1tskpswfrgp27.htm"&gt;SAS(R) 9.4 Companion for z/OS&lt;/A&gt;&amp;nbsp; (filename Z/OS)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 19:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-existing-mainframe-file-via-FILENAME-FTP/m-p/143835#M297006</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-11-14T19:43:05Z</dc:date>
    </item>
  </channel>
</rss>

