<?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 Getting error when executing sas file with command line in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182710#M46519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a web application which is .net 4.5 that runs on a windows 2008 web server with IIS 7.5 and SAS 9.3 64-bit.&amp;nbsp; I'm trying to execute a sas file that I generate on the file, but when I try and run this process I keep getting the following Errors in&amp;nbsp; C:\ProgramData\SAS\LOGS\sas.123.456789.log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;ERROR: Invalid physical name for library SASUSER.&lt;/P&gt;
&lt;P&gt;NOTE: Unable to initialize the options subsystem.&lt;/P&gt;
&lt;P&gt;ERROR: (SASXKINI): PHASE 3 KERNEL INITIALIZATION FAILED.&lt;/P&gt;
&lt;P&gt;ERROR: Unable to initialize the SAS kernel.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the c# code to execute the command line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;string cmd = string.Format(@"c:\Program Files\SASHome\SASFoundation\9.3\sas.exe");&lt;/P&gt;
&lt;P&gt;string sArgument = string.Format(@" -config C:\PROGRA~1\SASHome\SASFoundation\9.3\nls\en\sasv9Web.cfg -sysin d:\test\sas{0}.sas -log d:\test\sas{0}.log", ID);&lt;/P&gt;
&lt;P&gt;ProcessStartInfo pSI = new System.Diagnostics.ProcessStartInfo(cmd, sArgument);&lt;/P&gt;
&lt;P&gt;pSI.UseShellExecute = true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Process p = new Process();&lt;/P&gt;
&lt;P&gt;p.EnableRaisingEvents = true;&lt;/P&gt;
&lt;P&gt;p.Exited += new EventHandler(MyExited);&lt;/P&gt;
&lt;P&gt;p.StartInfo = pSI;&lt;/P&gt;
&lt;P&gt;p.Start();&lt;/P&gt;
&lt;P&gt;p.WaitForExit();&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to point to a new config file and within the config file i'm setting SASUSER to -SASUSER "!TEMP\SAS Temporary Files", but I still get this error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Apr 2014 19:52:12 GMT</pubDate>
    <dc:creator>jerry898969</dc:creator>
    <dc:date>2014-04-16T19:52:12Z</dc:date>
    <item>
      <title>Getting error when executing sas file with command line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182710#M46519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a web application which is .net 4.5 that runs on a windows 2008 web server with IIS 7.5 and SAS 9.3 64-bit.&amp;nbsp; I'm trying to execute a sas file that I generate on the file, but when I try and run this process I keep getting the following Errors in&amp;nbsp; C:\ProgramData\SAS\LOGS\sas.123.456789.log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;ERROR: Invalid physical name for library SASUSER.&lt;/P&gt;
&lt;P&gt;NOTE: Unable to initialize the options subsystem.&lt;/P&gt;
&lt;P&gt;ERROR: (SASXKINI): PHASE 3 KERNEL INITIALIZATION FAILED.&lt;/P&gt;
&lt;P&gt;ERROR: Unable to initialize the SAS kernel.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the c# code to execute the command line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;string cmd = string.Format(@"c:\Program Files\SASHome\SASFoundation\9.3\sas.exe");&lt;/P&gt;
&lt;P&gt;string sArgument = string.Format(@" -config C:\PROGRA~1\SASHome\SASFoundation\9.3\nls\en\sasv9Web.cfg -sysin d:\test\sas{0}.sas -log d:\test\sas{0}.log", ID);&lt;/P&gt;
&lt;P&gt;ProcessStartInfo pSI = new System.Diagnostics.ProcessStartInfo(cmd, sArgument);&lt;/P&gt;
&lt;P&gt;pSI.UseShellExecute = true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Process p = new Process();&lt;/P&gt;
&lt;P&gt;p.EnableRaisingEvents = true;&lt;/P&gt;
&lt;P&gt;p.Exited += new EventHandler(MyExited);&lt;/P&gt;
&lt;P&gt;p.StartInfo = pSI;&lt;/P&gt;
&lt;P&gt;p.Start();&lt;/P&gt;
&lt;P&gt;p.WaitForExit();&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to point to a new config file and within the config file i'm setting SASUSER to -SASUSER "!TEMP\SAS Temporary Files", but I still get this error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 19:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182710#M46519</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-04-16T19:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error when executing sas file with command line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182711#M46520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an existing folder named SAS Temporary Files in the path that !TEMP resoves to? I suspect the folder not existing is part of the problem since that is one of the most common causes of invalid physical name issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 15:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182711#M46520</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-04-17T15:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error when executing sas file with command line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182712#M46521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try pointing SASUSER to a physical directory that you know exists and that the user has write access.&lt;/P&gt;&lt;P&gt;If that works then you can debug why the other path doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 13:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-error-when-executing-sas-file-with-command-line/m-p/182712#M46521</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-04-19T13:49:05Z</dc:date>
    </item>
  </channel>
</rss>

