<?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: sas code for multiple prompt value in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225166#M16512</link>
    <description>&lt;P&gt;In case you have SAS Enterprise Guide available you can use the query builder to create a query that will subset the data based on your prompt. See Screenshot below. I have marked the relevant things when building a filter for a prompt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A multiple value prompt will create more than one macro variable. Find more information on this topic in the doc here &lt;A href="http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#n1ffjd8bu6we10n1neagn3fpxnsh.htm." target="_blank"&gt;http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#n1ffjd8bu6we10n1neagn3fpxnsh.htm.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/86i12F8D89162B422F2/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="Capture.PNG" title="Capture.PNG" border="0" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2015 14:11:58 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2015-09-11T14:11:58Z</dc:date>
    <item>
      <title>sas code for multiple prompt value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225160#M16510</link>
      <description>Hi,&lt;BR /&gt;I had a problem with writing the sas code in stored process. &lt;BR /&gt;Value IN (&amp;amp;integermultiplevalueprompt);&lt;BR /&gt;Is that true? And why it takes only the first variable and not all the integer list.&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 11 Sep 2015 13:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225160#M16510</guid>
      <dc:creator>Ramgem</dc:creator>
      <dc:date>2015-09-11T13:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: sas code for multiple prompt value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225164#M16511</link>
      <description>I think that if you want to used in a macro, you must create macro with option minoperator.&lt;BR /&gt;%macro example()/ minoperator;&lt;BR /&gt;&lt;BR /&gt;%mend;</description>
      <pubDate>Fri, 11 Sep 2015 14:06:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225164#M16511</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2015-09-11T14:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: sas code for multiple prompt value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225166#M16512</link>
      <description>&lt;P&gt;In case you have SAS Enterprise Guide available you can use the query builder to create a query that will subset the data based on your prompt. See Screenshot below. I have marked the relevant things when building a filter for a prompt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A multiple value prompt will create more than one macro variable. Find more information on this topic in the doc here &lt;A href="http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#n1ffjd8bu6we10n1neagn3fpxnsh.htm." target="_blank"&gt;http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#n1ffjd8bu6we10n1neagn3fpxnsh.htm.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/86i12F8D89162B422F2/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="Capture.PNG" title="Capture.PNG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2015 14:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225166#M16512</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-09-11T14:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: sas code for multiple prompt value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225169#M16513</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32"&gt;@BrunoMueller﻿&lt;/a&gt;&amp;nbsp;mentioned, the key point is that multiple value prompts create multiple macro variables, not a single variable holding a list of values. &amp;nbsp;I use a macro to create the list I want, something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro ConcatenateSelectionList
  (prompt
  ,dlm=%str( )
  );

%local i return ;

%if &amp;amp;&amp;amp;&amp;amp;prompt._Count &amp;gt;= 2 %then %do i = 1 %to &amp;amp;&amp;amp;&amp;amp;prompt._Count ;
  %if &amp;amp;i=1 %then %let return=&amp;amp;&amp;amp;&amp;amp;prompt&amp;amp;i ; 
  %else          %let return=&amp;amp;return&amp;amp;dlm&amp;amp;&amp;amp;&amp;amp;prompt&amp;amp;i ;   
%end ;
%else %if &amp;amp;&amp;amp;&amp;amp;prompt._Count = 1 %then %do ;
  %let return=&amp;amp;&amp;amp;&amp;amp;prompt ;
%end ;
%else %if &amp;amp;&amp;amp;&amp;amp;prompt._Count = 0 %then %do ;
  %let return= ; %*null ;
%end ;
%else %put ER%str()ROR: USER &amp;amp;=&amp;amp;prompt._Count;

&amp;amp;return

%mend ConcatenateSelectionList;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I blogged about over at bi-notes.com:&amp;nbsp;&lt;A href="http://bi-notes.com/2013/08/sas-stored-process-taming-selection-list-prompts/" target="_self"&gt;http://bi-notes.com/2013/08/sas-stored-process-taming-selection-list-prompts/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2015 14:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-code-for-multiple-prompt-value/m-p/225169#M16513</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-09-11T14:32:30Z</dc:date>
    </item>
  </channel>
</rss>

