<?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: Detect if code is running in stored process in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98810#M3655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand what you mean by executed normally vs executed via a stored process.&amp;nbsp; Can you explain a bit more?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the code executed by Enterprise Guide in each scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you saying you have a stored procedure, and the source code of the stored procedure %includes some other code?&amp;nbsp; And you want to tell if that second bit of code has been %included by a stored process or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2012 01:49:35 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2012-08-21T01:49:35Z</dc:date>
    <item>
      <title>Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98809#M3654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have code that is sometimes executed normally (windows sas 9.2, EG 4.3) and sometimes executed via a stored process&lt;/P&gt;&lt;P&gt;(the two are linked together in Eguide)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to execute code only if It's running from a stored process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%If (this is running in a stored process)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %stpbegin;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought to do it with a system variable but I couldn't find any that gives such information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 15:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98809#M3654</guid>
      <dc:creator>mathias</dc:creator>
      <dc:date>2012-08-20T15:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98810#M3655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand what you mean by executed normally vs executed via a stored process.&amp;nbsp; Can you explain a bit more?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the code executed by Enterprise Guide in each scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you saying you have a stored procedure, and the source code of the stored procedure %includes some other code?&amp;nbsp; And you want to tell if that second bit of code has been %included by a stored process or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 01:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98810#M3655</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2012-08-21T01:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98811#M3656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A: Executed normally = a program executed by Eguide&lt;/P&gt;&lt;P&gt;B: executed as &lt;SPAN style="color: #000000; font-family: 'trebuchet ms', arial, 'arial unicode ms', sans-serif; font-size: small; background-color: #ffffff;"&gt;Stored Process&lt;/SPAN&gt; = &lt;SPAN style="color: #000000; font-family: 'trebuchet ms', arial, 'arial unicode ms', sans-serif; font-size: small; background-color: #ffffff;"&gt;Stored Process&lt;/SPAN&gt; executed by EGuide OR executed by web (&lt;SPAN style="color: #000000; font-family: 'trebuchet ms', arial, 'arial unicode ms', sans-serif; font-size: small; background-color: #ffffff;"&gt;Stored Process Web Application&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say I have this little bit of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%If &amp;amp;MyCondition&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %then %do;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %stpbegin;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to find the right condition to make this code do nothing when A and do "%stpbegin" when B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if I'm not yet clear enough,&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 08:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98811#M3656</guid>
      <dc:creator>mathias</dc:creator>
      <dc:date>2012-08-21T08:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98812#M3657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not have access to run stored process, but when I played with EG a few years ago I found that I could tell if I was running code from EG because it created macro variable _CLIENTAPP.&amp;nbsp; It also created macros (not variables) name ENTERPRISEGUIDE and _EG_CONDITIONAL_DROPDS.&amp;nbsp; I am not sure if that is still true or if it would distinguish between code submitted via EG vs stored process execution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 08:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98812#M3657</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-08-21T08:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98813#M3658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's exactly what I was looking for &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;_CLIENTAPP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;/P&gt;&lt;P&gt;'SAS Enterprise Guide'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;SAS Enterprise Guide; CLR 2.0.50727.3620; Microsoft Windows NT 5.1.2600 Service Pack 3&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;StoredProcessService 9.2; JVM 1.6.0_16; Windows Server 2008 (amd64) 6.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 09:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98813#M3658</guid>
      <dc:creator>mathias</dc:creator>
      <dc:date>2012-08-21T09:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Detect if code is running in stored process</title>
      <link>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98814#M3659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Final thing :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro conditionalstpbegin() / store&lt;/P&gt;&lt;P&gt;DES='Conditionally executes %stpbegin';&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put &amp;amp;_CLIENTAPP;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if &amp;amp;_CLIENTAPP = 'SAS Enterprise Guide' %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put Not Stored Process °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* SAS Enterprise Guide; CLR 2.0.50727.3620; Microsoft Windows NT 5.1.2600 Service Pack 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; OR&lt;/P&gt;&lt;P&gt;&amp;nbsp; StoredProcessService 9.2; JVM 1.6.0_16; Windows Server 2008 (amd64) 6.1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put Stored Process °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %STPBEGIN &lt;/P&gt;&lt;P&gt;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend conditionalstpbegin;&lt;/P&gt;&lt;P&gt;%conditionalstpbegin;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 09:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Detect-if-code-is-running-in-stored-process/m-p/98814#M3659</guid>
      <dc:creator>mathias</dc:creator>
      <dc:date>2012-08-21T09:36:26Z</dc:date>
    </item>
  </channel>
</rss>

