<?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 How to Submit SAS Requests via SASGSUB in .Net Application (SAS 9.3/9.4) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/474492#M285921</link>
    <description>&lt;P&gt;We have a&amp;nbsp;VB.Net application that currently accesses SAS.exe (PC-SAS) via references within the code and executes SAS via the &lt;A title="Process Class" href="https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(System.Diagnostics.Process);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-VB)%26rd%3Dtrue&amp;amp;view=netframework-4.7.2" target="_self"&gt;.Net Process Class&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.FileName = clsSAS.CalculatedSaSVersion
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized
objProcess.StartInfo.Arguments = clsSAS.CalculatedSasConfig
objProcess.StartInfo.Arguments += String.Format(" -icon -nosplash -sysin ""{0}\{1}"" -log ""{0}"" -print ""{0}"" -sysparm ""{2}""", _
                                                 myReportRoot, _
                                                 "V" &amp;amp; myReportList(i), _
                                                 mySysparm)

SyncLock runlock
IO.Directory.SetCurrentDirectory(myReportRoot)
objProcess.Start()
End SyncLock

Do While Not objProcess.HasExited
Threading.Thread.Sleep(200)
If killproc = True Then
objProcess.Kill()
Return JobResults
End If&lt;/PRE&gt;
&lt;P&gt;SAS.exe is installed on the same server as the host that executes the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, so good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that this code needs updating since we're moving to SAS Grid&amp;nbsp;and it's my understanding that method for accessing SAS has changed to submitting jobs via SASGSUB (alas, I am not a SAS developer, but do modify code occasionally that interacts with SAS).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My searches for similar scenarios hasn't turned up much, although I did find an interesting &lt;A href="https://support.sas.com/rnd/scalability/grid/InterfaceEnterpriseScheduler.pdf" target="_self"&gt;white paper&lt;/A&gt; that I though may provide helpful information, in particular concerning the information regarding Windows Scripts and using .cmd files (ie: gsubrcm2.cmd).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just thought that I'd post a message in a SAS Community Formum to see if anyone can provide any insight or help&amp;nbsp;on&amp;nbsp;implementing SAS Grid in a .Net application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 16:28:58 GMT</pubDate>
    <dc:creator>drdexter33</dc:creator>
    <dc:date>2018-06-29T16:28:58Z</dc:date>
    <item>
      <title>How to Submit SAS Requests via SASGSUB in .Net Application (SAS 9.3/9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/474492#M285921</link>
      <description>&lt;P&gt;We have a&amp;nbsp;VB.Net application that currently accesses SAS.exe (PC-SAS) via references within the code and executes SAS via the &lt;A title="Process Class" href="https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(System.Diagnostics.Process);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-VB)%26rd%3Dtrue&amp;amp;view=netframework-4.7.2" target="_self"&gt;.Net Process Class&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.FileName = clsSAS.CalculatedSaSVersion
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized
objProcess.StartInfo.Arguments = clsSAS.CalculatedSasConfig
objProcess.StartInfo.Arguments += String.Format(" -icon -nosplash -sysin ""{0}\{1}"" -log ""{0}"" -print ""{0}"" -sysparm ""{2}""", _
                                                 myReportRoot, _
                                                 "V" &amp;amp; myReportList(i), _
                                                 mySysparm)

SyncLock runlock
IO.Directory.SetCurrentDirectory(myReportRoot)
objProcess.Start()
End SyncLock

Do While Not objProcess.HasExited
Threading.Thread.Sleep(200)
If killproc = True Then
objProcess.Kill()
Return JobResults
End If&lt;/PRE&gt;
&lt;P&gt;SAS.exe is installed on the same server as the host that executes the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, so good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that this code needs updating since we're moving to SAS Grid&amp;nbsp;and it's my understanding that method for accessing SAS has changed to submitting jobs via SASGSUB (alas, I am not a SAS developer, but do modify code occasionally that interacts with SAS).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My searches for similar scenarios hasn't turned up much, although I did find an interesting &lt;A href="https://support.sas.com/rnd/scalability/grid/InterfaceEnterpriseScheduler.pdf" target="_self"&gt;white paper&lt;/A&gt; that I though may provide helpful information, in particular concerning the information regarding Windows Scripts and using .cmd files (ie: gsubrcm2.cmd).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just thought that I'd post a message in a SAS Community Formum to see if anyone can provide any insight or help&amp;nbsp;on&amp;nbsp;implementing SAS Grid in a .Net application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 16:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/474492#M285921</guid>
      <dc:creator>drdexter33</dc:creator>
      <dc:date>2018-06-29T16:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Submit SAS Requests via SASGSUB in .Net Application (SAS 9.3/9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/476257#M285922</link>
      <description>&lt;P&gt;The following articles (and links within the articles) from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp; should give you a start.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/003-2013.pdf&amp;nbsp;" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/003-2013.pdf&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2013/06/09/sas-client-with-microsoft-dot-net/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2013/06/09/sas-client-with-microsoft-dot-net/&lt;/A&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2013/03/13/using-powershell-with-sas-workspace/&amp;nbsp;" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2013/03/13/using-powershell-with-sas-workspace/&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jul 2018 04:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/476257#M285922</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-07-08T04:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Submit SAS Requests via SASGSUB in .Net Application (SAS 9.3/9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/476886#M285923</link>
      <description>&lt;P&gt;Thanks..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 17:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Submit-SAS-Requests-via-SASGSUB-in-Net-Application-SAS-9/m-p/476886#M285923</guid>
      <dc:creator>drdexter33</dc:creator>
      <dc:date>2018-07-10T17:56:03Z</dc:date>
    </item>
  </channel>
</rss>

