<?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: Trying to execute SAS code from Powershell script in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742014#M232028</link>
    <description>&lt;P&gt;You should run your SAS programs in batch mode from a Powershell script. See this &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/p16esisc4nrd5sn1ps5l6u8f79k6.htm#p01fzykn6n0s73n164xasi1t3ii9" target="_blank" rel="noopener"&gt;link&lt;/A&gt; for how to do it.&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 21:08:17 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-05-17T21:08:17Z</dc:date>
    <item>
      <title>Trying to execute SAS code from Powershell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/741820#M231955</link>
      <description>&lt;P&gt;Using the ways listed below to call the SAS code in powershell script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#Step 2: Execute the SAS code&lt;BR /&gt;#Start-Process SAS -ArgumentList "-sysin ""C:\Users\apal1018\Desktop\Work\PHR automation\MY\Test.sas"""&lt;BR /&gt;#Start-Process SAS -ArgumentList "-initstmt '%include ""C:\Users\apal1018\Desktop\Work\PHR automation\MY\Test.sas"";'"&lt;BR /&gt;#Start-Process SAS -ArgumentList "-initstmt 'dm editor ""fileopen """"C:\Users\apal1018\Desktop\Work\PHR automation\MY\Test.sas"""""";dm ""SUBMIT;"";'"&lt;BR /&gt;Start-Process sasoact.exe -ArgumentList "action=Submit datatype=SASFile filename=""C:\Users\apal1018\Desktop\Work\PHR automation\MY\Test.sas"" progid=SAS.Application.940"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Getting same error everytime:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS C:\Users\apal1018&amp;gt; Start-Process sasoact.exe -ArgumentList "action=Submit datatype=SASFile filename=""C:\Users\apal1018\Desktop\Work\PHR automation\MY\Test.sas"" progid=SAS.Application.940"&lt;BR /&gt;&lt;STRONG&gt;Start-Process : This command cannot be run due to the error: The system cannot find the file specified.&lt;/STRONG&gt;&lt;BR /&gt;At line:1 char:1&lt;/P&gt;
&lt;P&gt;+ Start-Process sasoact.exe -ArgumentList "action=Submit datatype=SASFi ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException&lt;BR /&gt;+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 09:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/741820#M231955</guid>
      <dc:creator>Abhinav26</dc:creator>
      <dc:date>2021-05-17T09:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute SAS code from Powershell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742014#M232028</link>
      <description>&lt;P&gt;You should run your SAS programs in batch mode from a Powershell script. See this &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/p16esisc4nrd5sn1ps5l6u8f79k6.htm#p01fzykn6n0s73n164xasi1t3ii9" target="_blank" rel="noopener"&gt;link&lt;/A&gt; for how to do it.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 21:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742014#M232028</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-17T21:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute SAS code from Powershell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742344#M232183</link>
      <description>&lt;P&gt;This link has so many information.&lt;/P&gt;
&lt;P&gt;Could you please help me in identifying which part we need to copy and create environment favorable for SAS codes execution in batch mode.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 07:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742344#M232183</guid>
      <dc:creator>Abhinav26</dc:creator>
      <dc:date>2021-05-19T07:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute SAS code from Powershell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742377#M232206</link>
      <description>&lt;P&gt;is there any particular reason you use sasoact.exe instead of sas.exe? What happens if you execute the command in a cmd prompt? It seems that the system can't find the exe? Either specify the whole path or add the exe to the path?&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 11:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742377#M232206</guid>
      <dc:creator>DaanDNR</dc:creator>
      <dc:date>2021-05-19T11:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute SAS code from Powershell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742513#M232278</link>
      <description>&lt;P&gt;You run this command:&lt;/P&gt;
&lt;PRE&gt;”c:\Program Files\SASHome\SASFoundation\9.4\Sas.exe” -sysin c:\SASPrograms\prog1.sas -config ”c:\Program Files\SASHome\SASFoundation\9.4\sasv9.cfg”.&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 May 2021 21:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-execute-SAS-code-from-Powershell-script/m-p/742513#M232278</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-19T21:23:20Z</dc:date>
    </item>
  </channel>
</rss>

