<?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: ERROR: Invalid open mode. No body file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479854#M123917</link>
    <description>&lt;P&gt;Move the path into the file option and skip the path option and remove unnecessary quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.ExcelXP file='$HOME/TEST2.xls' style=Printer options(sheet_name="DDJanYY");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When posting code and log, please use the {i} or running-man icon to preserver formatting.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 11:54:01 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-07-20T11:54:01Z</dc:date>
    <item>
      <title>ERROR: Invalid open mode. No body file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479852#M123916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an excel document from data I have. I am using Base SAS 9.3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I am using for that is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ods&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;_all_&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;close&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ods&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; tagsets.ExcelXP &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;file&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'TEST2.xls'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;style&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;Printer&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;path&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'$HOME/'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; options(sheet_name=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"="DDJanYY"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;tabulate&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = TableTEST;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;.....&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp; .....[SPECIFICATIONS OF THE TABLE]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp; .....&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ods&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; tagsets.ExcelXP &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;close&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when trying to create the excel document I have this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;411 ods _all_ close;&lt;/P&gt;&lt;P&gt;Error opening file. File =/usr/users/uxxxxxxxx/TEST2.xls. System Error Code = 49.&lt;/P&gt;&lt;P&gt;412&lt;/P&gt;&lt;P&gt;413 ods tagsets.ExcelXP file='TEST2.xls' Path='/usr/users/uxxxxxxxx/' style=Printer&lt;/P&gt;&lt;P&gt;413! options(sheet_name="DDJanYY");&lt;/P&gt;&lt;P&gt;NOTE: Writing TAGSETS.EXCELXP Body file: TEST2.xls&lt;/P&gt;&lt;P&gt;ERROR: Invalid open mode.&lt;/P&gt;&lt;P&gt;ERROR: No body file. TAGSETS.EXCELXP output will not be created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where /usr/users/uxxxxxxxx/&lt;/P&gt;&lt;P&gt;is my HOME environment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[%let home = %sysget(HOME);&lt;/P&gt;&lt;P&gt;%put &amp;amp;home.;&lt;/P&gt;&lt;P&gt;/usr/users/uxxxxxxxx]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks to me as if I did not have writing permissions for my HOME environment but I don't know why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to create the excel in a specified path I change&amp;nbsp;instead of&amp;nbsp;$HOME/, For example 'C:My documents\whatever\'&amp;nbsp;but the error I get is something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;411 ods _all_ close;&lt;/P&gt;&lt;P&gt;Error opening file. File =/usr/users/uxxxxxxxx/TEST2.xls. System Error Code = 49.&lt;/P&gt;&lt;P&gt;412&lt;/P&gt;&lt;P&gt;413 ods tagsets.ExcelXP file='TEST2.xls' Path='/usr/users/uxxxxxxxx/C:My documents\whatever\' style=Printer&lt;/P&gt;&lt;P&gt;413! options(sheet_name="DDJanYY");&lt;/P&gt;&lt;P&gt;NOTE: Writing TAGSETS.EXCELXP Body file: TEST2.xls&lt;/P&gt;&lt;P&gt;ERROR: Invalid open mode.&lt;/P&gt;&lt;P&gt;ERROR: No body file. TAGSETS.EXCELXP output will not be created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why I get this error and how to solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am completely new to SAS and I apologize in advance if there are mistakes in my explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 11:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479852#M123916</guid>
      <dc:creator>laugonalo</dc:creator>
      <dc:date>2018-07-20T11:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Invalid open mode. No body file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479854#M123917</link>
      <description>&lt;P&gt;Move the path into the file option and skip the path option and remove unnecessary quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.ExcelXP file='$HOME/TEST2.xls' style=Printer options(sheet_name="DDJanYY");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When posting code and log, please use the {i} or running-man icon to preserver formatting.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 11:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479854#M123917</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-20T11:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Invalid open mode. No body file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479856#M123919</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which operating system does your SAS run on? I ask because I don't know a UNIX that is supported by SAS (AIX, HP-UX, Linux, Solaris) that does not have the home directories of users in /home per default.&lt;/P&gt;
&lt;P&gt;While users must not have write permissions for the parent of their $HOME, write permission on $HOME is a must. I wonder how SAS managed to create a SASUSER for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you use SAS Display Manager, SAS Studio, or SAS Enterprise Guide? If EG, try to create a new folder in your Server List/SASApp/Files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS don't try to lie to Excel. The output of tagsets.excelxp is XML, so files should have an extension of .xml. Newer versions of Excel complain when you want to open a XML file with a .xls extension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Invalid-open-mode-No-body-file/m-p/479856#M123919</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-20T12:22:19Z</dc:date>
    </item>
  </channel>
</rss>

