<?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: Programmatically assess whether a LASR server is active in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/438343#M109276</link>
    <description>&lt;P&gt;&lt;BR /&gt;You might consider issuing a serverinfo action using the imstat procedure. If you get the servers status back you can assume its up.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/inmsref/70021/HTML/default/viewer.htm#n0kpeeuwv9vy29n1icxxhbuagc3t.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/inmsref/70021/HTML/default/viewer.htm#n0kpeeuwv9vy29n1icxxhbuagc3t.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2018 04:57:17 GMT</pubDate>
    <dc:creator>SimonDawson</dc:creator>
    <dc:date>2018-02-19T04:57:17Z</dc:date>
    <item>
      <title>Programmatically assess whether a LASR server is active</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/437469#M108925</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've written Base &amp;amp; Macro code to obtain from Metadata a list of LASR instances I'd like to start in anticipation of an outage this weekend. Whilst I don't doubt this will work, I do like to throw caution to the wind and program for all eventualities - such as the Macro failing half-way through, needing a restart, and then failing again because it tries to start a server that's already started.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, a very high level view of the code is this:&lt;BR /&gt;- Obtain Metadata list of servers.&lt;/P&gt;&lt;P&gt;- Define variables like Port, Tag, LogDir&lt;/P&gt;&lt;P&gt;- ?????&lt;/P&gt;&lt;P&gt;- Start Server&lt;/P&gt;&lt;P&gt;- Check Server status&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;????? is the missing piece - this is where I'd like to check the server is active prior to trying to start it up. Is there a decent way of doing this, one that either tells me the server is alive, or, one that handles an ERROR: properly and doesn't kill the SAS code (sort of like On Error Goto Next in VBA).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'd like to do this in SAS code to remove any issues that may come with the permissions and governance of the Unix file system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in anticipation,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 09:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/437469#M108925</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2018-02-15T09:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically assess whether a LASR server is active</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/438343#M109276</link>
      <description>&lt;P&gt;&lt;BR /&gt;You might consider issuing a serverinfo action using the imstat procedure. If you get the servers status back you can assume its up.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/inmsref/70021/HTML/default/viewer.htm#n0kpeeuwv9vy29n1icxxhbuagc3t.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/inmsref/70021/HTML/default/viewer.htm#n0kpeeuwv9vy29n1icxxhbuagc3t.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 04:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/438343#M109276</guid>
      <dc:creator>SimonDawson</dc:creator>
      <dc:date>2018-02-19T04:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically assess whether a LASR server is active</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/438892#M109464</link>
      <description>&lt;P&gt;Thanks Simon, you're right of course, but it just forces an ERROR: when the server has been terminated and I was looking for a method that would maybe prompt a Boolean response, or would be handled without forcing an ERROR: into the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this time, I'm just assigning a LIBNAME&amp;nbsp;(that also returns an ERROR: if the server is down) and I then use an IFC statement to query the existence of the libref, which then allows me to conditionally set a macro variable as to the success or failure of the server startup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder, is there a standard macro variable like &amp;amp;syserr, &amp;amp;sysrc etc that'll tell me the result of the PROC LASR CREATE once it's completed? As I'm not in a position to 'break' the CREATE procedure, I wouldn't be able to test the sort of response codes I could expect should the procedure fail or complete properly.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 09:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-assess-whether-a-LASR-server-is-active/m-p/438892#M109464</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2018-02-21T09:10:19Z</dc:date>
    </item>
  </channel>
</rss>

