<?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 Stored Process Passing Parm with no value in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335031#M22269</link>
    <description>&lt;P&gt;Updating&amp;nbsp;stored process prompts&amp;nbsp;in EG 7.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;Prompt SBU is a static list and includes the option of "ALL"&lt;/P&gt;&lt;P&gt;Market&amp;nbsp; is dynamic drop down lists built from an external file and is dependent on SBU.&lt;/P&gt;&lt;P&gt;File building MARKET does not contain option for ALL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to only pick SBU while leaving MARKET blank and then interpret this as MARKET = ALL in the program.&lt;/P&gt;&lt;P&gt;I'm able to do this by allowing blank as a choice. Then when parm passes to program it shows on the log as MARKET=; and resolves to MARKET=''.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried various methods to "read" what is in MARKET parm...is it blank? null? Missing? but nothing works...there must be a way to determine what is contained in MARKET in order to re-set it to ALL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any thoughts are appreciated.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13479i3E4552BE2777D883/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;</description>
    <pubDate>Wed, 22 Feb 2017 17:06:32 GMT</pubDate>
    <dc:creator>BHull</dc:creator>
    <dc:date>2017-02-22T17:06:32Z</dc:date>
    <item>
      <title>Stored Process Passing Parm with no value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335031#M22269</link>
      <description>&lt;P&gt;Updating&amp;nbsp;stored process prompts&amp;nbsp;in EG 7.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;Prompt SBU is a static list and includes the option of "ALL"&lt;/P&gt;&lt;P&gt;Market&amp;nbsp; is dynamic drop down lists built from an external file and is dependent on SBU.&lt;/P&gt;&lt;P&gt;File building MARKET does not contain option for ALL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to only pick SBU while leaving MARKET blank and then interpret this as MARKET = ALL in the program.&lt;/P&gt;&lt;P&gt;I'm able to do this by allowing blank as a choice. Then when parm passes to program it shows on the log as MARKET=; and resolves to MARKET=''.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried various methods to "read" what is in MARKET parm...is it blank? null? Missing? but nothing works...there must be a way to determine what is contained in MARKET in order to re-set it to ALL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any thoughts are appreciated.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13479i3E4552BE2777D883/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335031#M22269</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-02-22T17:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Passing Parm with no value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335045#M22270</link>
      <description>In your stored process, if you code %put &amp;gt;&amp;gt;&amp;amp;market&amp;lt;&amp;lt;;  what do you see in the log?  If it shows &amp;gt;&amp;gt;&amp;lt;&amp;lt; then the macro variable is null.  If you see quotation marks between the angle brackets, then that is the value of the macro variable (would be odd).</description>
      <pubDate>Wed, 22 Feb 2017 17:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335045#M22270</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-02-22T17:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Passing Parm with no value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335050#M22272</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;test shows parm is null...&lt;/P&gt;&lt;P&gt;I think I solved it by doing this.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%MACRO&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &lt;STRONG&gt;&lt;I&gt;TEST&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;market &amp;gt; &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;''&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; market = &amp;amp;market;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; market=ALL;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%MEND&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335050#M22272</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-02-22T18:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Passing Parm with no value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335055#M22273</link>
      <description>&lt;P&gt;Testing for null macro vars is suprisingly tricky.&lt;/P&gt;
&lt;P&gt;&amp;amp;market &amp;gt; ''&amp;nbsp; will actually compare the value of &amp;amp;market to the value of two quote marks.&amp;nbsp; The macro language does not use quotation marks in the same way as the data step language.&amp;nbsp; In the macro language, quot marks are part of the value, just like any other text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chung &amp;amp; King have a nice paper on how to test for blank parameters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://changchung.com/download/022-2009.pdf" target="_blank"&gt;http://changchung.com/download/022-2009.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Their approach would suggest you use something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO TEST;

%if %sysevalf(%superq(market)=,boolean) %then %let market = ALL;

%MEND;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335055#M22273</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-02-22T18:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Passing Parm with no value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335057#M22274</link>
      <description>Thank you for your reply....&lt;BR /&gt;I found this paper and actually tried to use this solution...was not successful.&lt;BR /&gt;I'm sure it was my limited understanding of macro language...but I was able to sort it out using reverse logic...&lt;BR /&gt;%MACRO TESTBLANK;&lt;BR /&gt;%if &amp;amp;market &amp;gt; '' %then %let market = &amp;amp;market;&lt;BR /&gt;%else %let market=ALL;&lt;BR /&gt;%MEND;&lt;BR /&gt;&lt;BR /&gt;May not be elegant but it works...&lt;BR /&gt;Thanks again...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Stored-Process-Passing-Parm-with-no-value/m-p/335057#M22274</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-02-22T18:29:19Z</dc:date>
    </item>
  </channel>
</rss>

