<?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: How to identify if working in EG or SAS/Win? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526622#M143460</link>
    <description>Thanks for your idea. One of the things I like about SAS is that there is usually more than one way to do something. Of course, sometimes that's a bad thing too. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Sat, 12 Jan 2019 18:21:19 GMT</pubDate>
    <dc:creator>bentleyj1</dc:creator>
    <dc:date>2019-01-12T18:21:19Z</dc:date>
    <item>
      <title>How to identify if working in EG or SAS/Win?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526521#M143407</link>
      <description>&lt;P&gt;I have a need to write a program that runs manually on EG&amp;nbsp;connected to a server&amp;nbsp;and on SAS/Win submitting to a server&amp;nbsp;and on Linux with the job submitted as batch with Cron.&amp;nbsp; In the past I've used &amp;amp;sysscp to identify if we're running on SAS/Win or a server but how to identify EG?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EG creates automatic macro variables not created by the other environments (like _clientVersion)&amp;nbsp;and I could use %SYMEXIST to see if one of them is in the global macro table, but&amp;nbsp;is there an automatic variable like &amp;amp;sysscp that says 'EG'?&amp;nbsp;&amp;nbsp; I couldn't find one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2012/10/09/special-macro-vars-in-eg/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2012/10/09/special-macro-vars-in-eg/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 22:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526521#M143407</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2019-01-11T22:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify if working in EG or SAS/Win?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526585#M143437</link>
      <description>&lt;P&gt;Hi Bentleyj1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I dont think such a varible exists, but it easy to create.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a&amp;nbsp;typical SAS server setup there are separate server contexts, and each has its own configurations files, so EG and BATCH would use different SAS config-files. The&amp;nbsp;cfg-files are placed in&amp;nbsp; locations like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"/sas/prod/config/Lev1/EGApp/sasv9_usermods.cfg".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you (or your SAS administrator) added a line like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-set=SAS_CONTEXT "EG"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&amp;nbsp;a sasv9_usermods.cfg file, it would be accsible via %sysget in all programs&amp;nbsp;started in that context, so&lt;/P&gt;
&lt;P&gt;%if %sysget(SAS_CONTEXT) = EG %then ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that environment-variable names are case-sensitive in Linux.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jan 2019 09:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526585#M143437</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-01-12T09:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify if working in EG or SAS/Win?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526601#M143449</link>
      <description>Hi:&lt;BR /&gt;  EG isn't an operating system, so &amp;amp;sysscp won't work. The _CLIENT macro variables seem to me to be your best bet. I believe that there are 2:&lt;BR /&gt;GLOBAL _CLIENTAPP 'SAS Enterprise Guide'&lt;BR /&gt;GLOBAL _CLIENTAPPABBREV EG&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 12 Jan 2019 15:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526601#M143449</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-01-12T15:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify if working in EG or SAS/Win?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526622#M143460</link>
      <description>Thanks for your idea. One of the things I like about SAS is that there is usually more than one way to do something. Of course, sometimes that's a bad thing too. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sat, 12 Jan 2019 18:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-if-working-in-EG-or-SAS-Win/m-p/526622#M143460</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2019-01-12T18:21:19Z</dc:date>
    </item>
  </channel>
</rss>

