<?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 FTP data from PC SAS to z/OS flat file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545216#M150796</link>
    <description>&lt;P&gt;Hello, I'm trying to FTP data from a local PC SAS data set onto a z/OS mainframe flat file. I'm able to use the FILENAME statement to FTP the data, but it's not in the right format. I've tried changing the formats of the data in the data set, but it keeps looking like junk data. However, if I view the data with ASCII data encoding, I can see that the data's there, but just in a different format. Also, if I FTP the data manually from a text file through Filezilla&amp;nbsp;(transferring as&amp;nbsp;ASCII) it works like a charm.&amp;nbsp;Here's the top of the data viewed with ASCII:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;**COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED&lt;/P&gt;&lt;P&gt;LIB CONTROL W32_7PRO¼ SAS9.4¼&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to me like it's posting some of the data set's meta data or something? Here's the data set with the FILENAME FTP, and the PROC CPORT to get it onto the mainframe:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data RTR3;
   set RTR2;
   d=strip(a||date||c);
   keep d;
run;

FILENAME RTR3 FTP "'TEST.RTR.TAB21.RTR3'"                         
	Host = 'atrsyse'
    User = "&amp;amp;user" Pass = "&amp;amp;pass" Rcmd = 'ascii';

PROC CPORT DATA = RTR3 FILE = RTR3;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Version 9.4 on PC and mainframe.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 13:34:52 GMT</pubDate>
    <dc:creator>tylerjazz</dc:creator>
    <dc:date>2019-03-22T13:34:52Z</dc:date>
    <item>
      <title>FTP data from PC SAS to z/OS flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545216#M150796</link>
      <description>&lt;P&gt;Hello, I'm trying to FTP data from a local PC SAS data set onto a z/OS mainframe flat file. I'm able to use the FILENAME statement to FTP the data, but it's not in the right format. I've tried changing the formats of the data in the data set, but it keeps looking like junk data. However, if I view the data with ASCII data encoding, I can see that the data's there, but just in a different format. Also, if I FTP the data manually from a text file through Filezilla&amp;nbsp;(transferring as&amp;nbsp;ASCII) it works like a charm.&amp;nbsp;Here's the top of the data viewed with ASCII:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;**COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED&lt;/P&gt;&lt;P&gt;LIB CONTROL W32_7PRO¼ SAS9.4¼&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to me like it's posting some of the data set's meta data or something? Here's the data set with the FILENAME FTP, and the PROC CPORT to get it onto the mainframe:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data RTR3;
   set RTR2;
   d=strip(a||date||c);
   keep d;
run;

FILENAME RTR3 FTP "'TEST.RTR.TAB21.RTR3'"                         
	Host = 'atrsyse'
    User = "&amp;amp;user" Pass = "&amp;amp;pass" Rcmd = 'ascii';

PROC CPORT DATA = RTR3 FILE = RTR3;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Version 9.4 on PC and mainframe.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 13:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545216#M150796</guid>
      <dc:creator>tylerjazz</dc:creator>
      <dc:date>2019-03-22T13:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: FTP data from PC SAS to z/OS flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545218#M150799</link>
      <description>&lt;P&gt;The beginning of that file makes it look like a SAS export file.&amp;nbsp; If so then it is a BINARY file even though the beginning of it looks like text. If you transfer it as ASCII (or text) to an IBM mainframe then it will be converted to EBCDIC and the content will be unreadable.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 13:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545218#M150799</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-22T13:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: FTP data from PC SAS to z/OS flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545404#M150870</link>
      <description>&lt;P&gt;You need to FTP the CPORTed file using the BINARY option to a z/OS file that has LRECL set to 80 and BLKSIZE to 8000. PROC CIMPORT on z/OS requires an ASCII-formatted file hence the need to use BINARY to retain this format.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 01:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-data-from-PC-SAS-to-z-OS-flat-file/m-p/545404#M150870</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-03-23T01:02:48Z</dc:date>
    </item>
  </channel>
</rss>

