<?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: How to export a table to a unix directory in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809821#M319370</link>
    <description>&lt;P&gt;You just create another libname statment that points to another directory, and then refer to that in your create table statement.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 07:27:46 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2022-04-26T07:27:46Z</dc:date>
    <item>
      <title>How to export a table to a unix directory in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809812#M319362</link>
      <description>&lt;P&gt;Hello I have a ope_locale on a unix directory that I want to use to make it smaller, by selecting dates less than the current year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a new table&amp;nbsp;ope_locale from the current table. However, I want to output the new table to another directory in unix &lt;STRONG&gt;/dir/run/folders/files/d2d/tabsas/adobe/test/newtables&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I have looked everywhere for a code to output sastables having a sas7bdat format into unix but haven't found any.&amp;nbsp;&lt;BR /&gt;Can someone help please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname wvsoc "/dir/run/folders/files/d2d/tabsas/adobe/test";

data date;
format date_archiv date9.;

annee_archiv = year(date())-1;
date_archiv = mdy(1,1, input(annee_archiv, best.));
call symput('date_archiv', date_archiv);
run;

proc sql;
create table ope_locale as
select * from wvsoc.ope_locale 
where adb_date_creation &amp;gt; dhms(&amp;amp;date_archiv,0,0,0);
quit;

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 06:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809812#M319362</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2022-04-26T06:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a table to a unix directory in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809820#M319369</link>
      <description>&lt;P&gt;Every step that creates a SAS dataset creates a file with a .sas7bdat extension (if run on Windows or UNIX, z/OS or VMS are different). A SAS library (on Windows or UNIX) is a directory containing .sas7bdat files (and .sas7bcat - catalogs, .sas7bvew - views, and some more).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So all you need to do is define a LIBNAME for the new location and create the dataset there.&lt;/P&gt;
&lt;P&gt;You also need to acquaint yourself with the INTNX and INTCK functions, the most important functions for handling dates and times.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname wvsoc "/dir/run/folders/files/d2d/tabsas/adobe/test";

libname n_wvsoc "/dir/run/folders/files/d2d/tabsas/adobe/test/newtables";

%let annee_archiv = %sysfunc(intnx(dtyear,%sysfunc(datetime(),-1,b));

data n_wvsocope_locale;
set wvsoc.ope_locale;
where adb_date_creation &amp;gt; &amp;amp;date_archiv.;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Apr 2022 07:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809820#M319369</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-26T07:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to export a table to a unix directory in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809821#M319370</link>
      <description>&lt;P&gt;You just create another libname statment that points to another directory, and then refer to that in your create table statement.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 07:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-a-table-to-a-unix-directory-in-sas/m-p/809821#M319370</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-04-26T07:27:46Z</dc:date>
    </item>
  </channel>
</rss>

