<?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: unix command to convert sas7bdat file to csv file? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141689#M261598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply. I renamed my file name to abc.sas7bdat, in order to avoid any problem. Also, I copied my sas file into the save folder where the abs.sas7bdat exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I copied exactly the same code as yours and saved as a file named sas2csv.sas, and run it using the unix command line:&amp;nbsp; sas sas2csv.sas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;EXPORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;&amp;nbsp; = &lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800080;"&gt;"abc.sas7bdat"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;FILE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: purple;"&gt;"abc.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = CSV&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;REPLACE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, I got an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC EXPORT Data&amp;nbsp; = "abc.sas7bdat"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ERROR: ""abc.sas7bdat"" is not a valid name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I don't understand why it is not valid............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2014 16:56:07 GMT</pubDate>
    <dc:creator>lserlohn</dc:creator>
    <dc:date>2014-09-12T16:56:07Z</dc:date>
    <item>
      <title>unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141684#M261593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am a very new SAS user. I need to convert a 4Gb sas7bdat file to csv file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried python, but it generates many &lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small; background-color: #ffffff;"&gt;unrecognizable characters each row.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small; background-color: #ffffff;"&gt;I have tried R, but it says it does not support such big file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the only way seems to be using SAS Unix command to convert the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I only have a remote SAS Unix server, and I know nothing about SAS and Unix SAS command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see some website mentioned that write a Proc, but is there a step by step instruction on how to write and how to execute?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 23:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141684#M261593</guid>
      <dc:creator>lserlohn</dc:creator>
      <dc:date>2014-09-11T23:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141685#M261594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A good starting point is the SAS EXPORT procedure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 9pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt; MySASLib &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 9pt;"&gt;"/Folder1/Folder2/SASData"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: Consolas;"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: Consolas;"&gt;EXPORT&lt;/STRONG&gt; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 9pt;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp; = MySASLib.MySASDataset &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 9pt;"&gt;FILE&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 9pt;"&gt;"/Folder1/Folder2/CSV/MySASDataset.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 9pt;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt; = CSV &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 9pt;"&gt;REPLACE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: Consolas;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify this code to match your SAS dataset and CSV file, save it as a text file on the SAS server with a .SAS extension (eg MySASProg,sas).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then at a Unix command line try: sas -sysin '/MySASFolder/MySASProg.sas'&amp;nbsp;&amp;nbsp; - this should run your SAS program and write the CSV file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 01:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141685#M261594</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-09-12T01:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141686#M261595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello, thanks for your detail instruction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created such file and execute it on Unix. However, I got a error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; libname MySASLib "abc.sas7bdat";&lt;/P&gt;&lt;P&gt;ERROR: Library MYSASLIB is not in a valid format for access method RANDOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that mean the file has been opened and not valid for read at this time? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 01:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141686#M261595</guid>
      <dc:creator>lserlohn</dc:creator>
      <dc:date>2014-09-12T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141687#M261596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your LIBNAME statement must reference the system folder/directory in which your SAS dataset is stored, not the name of the SAS dataset file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt; MySASLib &lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: Consolas; font-size: 9pt;"&gt;"/Folder1/Folder2"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 03:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141687#M261596</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-09-12T03:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141688#M261597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to define a LIBREF for this problem. Just use the quoted filename as the value of the DATA= parameter for PROC EXPORT. You do not need to include any path names ("folder" names) if the files are in the current directory.&amp;nbsp; Also when running a SAS program from the Unix prompt there is no need to include -SYSIN option.&amp;nbsp; Just use:&amp;nbsp; sas filename.&amp;nbsp; Note that if your filename includes spaces or other special characters then Unix will want you to use quotes around the name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG&gt;EXPORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;&amp;nbsp; = &lt;SPAN style="color: #800080; font-family: Consolas; font-size: 12px; background-color: #ffffff;"&gt;"abc.sas7bdat"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;FILE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: purple;"&gt;"abc.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = CSV&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;REPLACE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 03:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141688#M261597</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-12T03:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141689#M261598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply. I renamed my file name to abc.sas7bdat, in order to avoid any problem. Also, I copied my sas file into the save folder where the abs.sas7bdat exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I copied exactly the same code as yours and saved as a file named sas2csv.sas, and run it using the unix command line:&amp;nbsp; sas sas2csv.sas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;EXPORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;&amp;nbsp; = &lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800080;"&gt;"abc.sas7bdat"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;FILE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: purple;"&gt;"abc.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt; = CSV&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: blue;"&gt;REPLACE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: navy;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: Consolas; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, I got an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC EXPORT Data&amp;nbsp; = "abc.sas7bdat"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ERROR: ""abc.sas7bdat"" is not a valid name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I don't understand why it is not valid............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 16:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141689#M261598</guid>
      <dc:creator>lserlohn</dc:creator>
      <dc:date>2014-09-12T16:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141690#M261599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The extension .sas7bdat is a part of the physical name. When programming in SAS, you use a logical name, which happens to first, the name of the libref, and second the dataset name (the file name without the extension).&lt;/P&gt;&lt;P&gt;Renaming the file was totally unnecessary.&lt;/P&gt;&lt;P&gt;Carefully look at SASKiwi's example, it's all there...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 17:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141690#M261599</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-09-12T17:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: unix command to convert sas7bdat file to csv file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141691#M261600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps PROC EXPORT is too stupid to support that syntax. It does have problems with a number of normal SAS syntax issues.&lt;/P&gt;&lt;P&gt;Personally I usually just use a DATA step to write CSV files.&amp;nbsp; Especially if you do not need the column headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&amp;nbsp; set "abc.sas7bdat";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&amp;nbsp; file "abc.csv" dsd lrecl=30000 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&amp;nbsp; put (_all_) (:);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Note that on Unix the filename for a SAS dataset must be in lower case.&amp;nbsp; So ABC.sas7bdat will not work.&amp;nbsp; SAS will not see it since it will be looking for abc.sas7bdat and on a Unix system those are two different file names.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 17:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unix-command-to-convert-sas7bdat-file-to-csv-file/m-p/141691#M261600</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-12T17:56:15Z</dc:date>
    </item>
  </channel>
</rss>

