<?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 How to export sas output to physical file from WORK library in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719487#M222766</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After running code, I have a library WORK with 64 outputs like the picture below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_0-1613428516190.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54777i96A9987953789F2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="My97_0-1613428516190.png" alt="My97_0-1613428516190.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And normally I export to physical file for one file is as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfolder 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\2Cfiltering';
proc copy in=work out=myfolder;
select argentina_merge2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could you please help me to generate code to export all files from library work to physical files as above? I appreciate any other alternative way in doing so as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to "export" because I do not want to write a so-called "long" code because it is really a mess for me to debug afterward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;P/S: I also added the output of content of library "&lt;STRONG&gt;WORK&lt;/STRONG&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And when running PROC CONTENTS, I saw some strange &lt;STRONG&gt;memname&lt;/STRONG&gt; that I do not know where they come from, so be careful about them&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_0-1613429031041.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54778i32904A660F0D6ACB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="My97_0-1613429031041.png" alt="My97_0-1613429031041.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2021 22:44:09 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2021-02-15T22:44:09Z</dc:date>
    <item>
      <title>How to export sas output to physical file from WORK library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719487#M222766</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After running code, I have a library WORK with 64 outputs like the picture below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_0-1613428516190.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54777i96A9987953789F2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="My97_0-1613428516190.png" alt="My97_0-1613428516190.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And normally I export to physical file for one file is as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfolder 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\2Cfiltering';
proc copy in=work out=myfolder;
select argentina_merge2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could you please help me to generate code to export all files from library work to physical files as above? I appreciate any other alternative way in doing so as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to "export" because I do not want to write a so-called "long" code because it is really a mess for me to debug afterward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;P/S: I also added the output of content of library "&lt;STRONG&gt;WORK&lt;/STRONG&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And when running PROC CONTENTS, I saw some strange &lt;STRONG&gt;memname&lt;/STRONG&gt; that I do not know where they come from, so be careful about them&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_0-1613429031041.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54778i32904A660F0D6ACB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="My97_0-1613429031041.png" alt="My97_0-1613429031041.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 22:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719487#M222766</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-02-15T22:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to export sas output to physical file from WORK library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719493#M222770</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Could you please help me to generate code to export all files from library work to physical files as above?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The work files are physical files, so this question is oddly worded.&lt;/P&gt;
&lt;P&gt;Look at the &lt;FONT face="courier new,courier"&gt;proc copy&lt;/FONT&gt; statements, especially &lt;FONT face="courier new,courier"&gt;exclude&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;select&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;Or maybe copy all, and delete the unneeded ones, like _PRODSAVAIL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 23:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719493#M222770</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-15T23:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to export sas output to physical file from WORK library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719495#M222772</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean, how to macronize or generalize the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfolder 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\2Cfiltering';
proc copy in=work out=myfolder;
select argentina_merge2;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For all files in the library work (the code above just for only one output file in the library &lt;STRONG&gt;work&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 23:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719495#M222772</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-02-15T23:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to export sas output to physical file from WORK library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719497#M222774</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;R e a d&amp;nbsp; &amp;nbsp;t h e&amp;nbsp; &amp;nbsp;d o c u m e n t a t i o n.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, remove the select statement.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 23:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-sas-output-to-physical-file-from-WORK-library/m-p/719497#M222774</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-15T23:26:15Z</dc:date>
    </item>
  </channel>
</rss>

