<?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: Transfer files from Mainframe to PC in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/358771#M10770</link>
    <description>If I use ftp transfer SAS data set from mainframe.I can only transfer the folder which I can't open in PC.</description>
    <pubDate>Mon, 15 May 2017 15:41:07 GMT</pubDate>
    <dc:creator>GeorgeSAS</dc:creator>
    <dc:date>2017-05-15T15:41:07Z</dc:date>
    <item>
      <title>Transfer files from Mainframe to PC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357656#M10741</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use SAS in pc and mainframe.&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp;3 JCL FILES at mainframe under AAAAAAAA.BBBBBBBB.MYLIBS.PDS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to transfer the three jcl files(please note,&amp;nbsp;I want transfer regular files, not SAS dataset) from mainframe to my pc. please help me on my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;LIBNAME pc_lib "C:\TEMP5";

%connect(...,...);/*a macro can connect to mainframe*/

rsubmit remote=abasa;
libname M_lib    "AAAAAAAA.BBBBBBBB.MYLIBS.PDS";

proc download inlib=M_lib outlib=pc_lib;
run;


endrsubmit;
 signoff;
&lt;/PRE&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 19:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357656#M10741</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-10T19:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files from Mainframe to PC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357659#M10743</link>
      <description>&lt;P&gt;What help do you want?&lt;/P&gt;
&lt;P&gt;Did you get an error, warning or no result ? POST the LOG with the submitted code. XXXX out any sensitive bits before posting though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 19:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357659#M10743</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-10T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files from Mainframe to PC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357662#M10744</link>
      <description>If you are downloading non SAS files you shouldn't use a libname and in/outlib references. Just file=.&lt;BR /&gt;Be aware of encoding issues.</description>
      <pubDate>Wed, 10 May 2017 20:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/357662#M10744</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-05-10T20:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files from Mainframe to PC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/358771#M10770</link>
      <description>If I use ftp transfer SAS data set from mainframe.I can only transfer the folder which I can't open in PC.</description>
      <pubDate>Mon, 15 May 2017 15:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/358771#M10770</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-15T15:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files from Mainframe to PC</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/358779#M10771</link>
      <description>&lt;P&gt;You should be able to use FTP to transfer the members of a Mainframe PDS the same way that you can transfer individual files from a directory on windows or linux computer. You should be able to use cd command and/or the mget command.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cd AAAAAAAA.BBBBBBBB.MYLIBS.PDS
mget *&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mget AAAAAAAA.BBBBBBBB.MYLIBS.PDS(*)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said you can use PROC DOWNLOAD to copy the files. There is even an example in the documentation.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#p0kysiltpwwgbon1uzlo1ipmlxf0.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#p0kysiltpwwgbon1uzlo1ipmlxf0.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Basically make a local fileref that points to the folder you want to write the files and a remote fileref that points to the PDS.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename locdir 'some_local_directory';
rsubmit;
  filename inpds 'mfhost.sas.programs' shr;
  proc download infile=inpds('*') outfile=locdir;
  run;
endrsubmit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 16:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transfer-files-from-Mainframe-to-PC/m-p/358779#M10771</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-05-15T16:40:14Z</dc:date>
    </item>
  </channel>
</rss>

