<?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: Prompt Manager and macros in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22778#M3565</link>
    <description>Hmm... that's ugly. One could almost call this a bug.&lt;BR /&gt;
&lt;BR /&gt;
So the macro should be coded like this?&lt;BR /&gt;
&lt;BR /&gt;
%macro list_multi_string;&lt;BR /&gt;
%if  &amp;amp;prompt_multi_string_count=1 %then&lt;BR /&gt;
   %put prompt_multi_string= &amp;amp;prompt_multi_string;&lt;BR /&gt;
%else&lt;BR /&gt;
%do i=1 %to &amp;amp;prompt_multi_string_count;&lt;BR /&gt;
   %put prompt_multi_string&amp;amp;i= &amp;amp;&amp;amp;prompt_multi_string&amp;amp;i;&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%list_multi_string</description>
    <pubDate>Tue, 01 Dec 2009 11:56:10 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2009-12-01T11:56:10Z</dc:date>
    <item>
      <title>Prompt Manager and macros</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22774#M3561</link>
      <description>Dear All,&lt;BR /&gt;
&lt;BR /&gt;
I have set up a macro prompt in a project which is a text prompt which requires the user to enter a set of multiple values which have been obtained from an existing dataset.  I have linked the prompt to a programme within the project successfully.&lt;BR /&gt;
&lt;BR /&gt;
When I run the programme, the prompt comes up as expected.  Now I choose say three elements from the list by checking the appropriate boxes.  So far so good.  However when I try and see what is in the macro by using the %PUT &amp;amp;macroname I only get the very first element of the macro returned.  If I do %PUT macroname_count I get the answer 3 – so what has happened to the other 2 elements?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Best wishes, Chris</description>
      <pubDate>Fri, 27 Nov 2009 13:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22774#M3561</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-11-27T13:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager and macros</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22775#M3562</link>
      <description>Just a theory:&lt;BR /&gt;
&lt;BR /&gt;
Try:   %put %str(&amp;amp;macroname);</description>
      <pubDate>Sat, 28 Nov 2009 03:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22775#M3562</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-11-28T03:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager and macros</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22776#M3563</link>
      <description>Hi Chris&lt;BR /&gt;
&lt;BR /&gt;
Got it now!&lt;BR /&gt;
&lt;BR /&gt;
Have a look at your log. You'll see there a bunch of %symdel deleting numbered macros (macroname1, macroname2,...). Seems that's how the entered values get translated into SAS code.&lt;BR /&gt;
&lt;BR /&gt;
You can also use "export Program.." and you'll see what's happening.&lt;BR /&gt;
&lt;BR /&gt;
Here a code example how to list the values for a "multi input text prompt" called "prompt_multi_string".&lt;BR /&gt;
&lt;BR /&gt;
%macro list_multi_string;&lt;BR /&gt;
  %do i=1 %to &amp;amp;prompt_multi_string_count;&lt;BR /&gt;
    %put prompt_multi_string&amp;amp;i= &amp;amp;&amp;amp;prompt_multi_string&amp;amp;i;&lt;BR /&gt;
  %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%list_multi_string&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Sat, 28 Nov 2009 05:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22776#M3563</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-11-28T05:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager and macros</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22777#M3564</link>
      <description>Thank you Patrick - that's exactly it.  There is a corresponding odd problem it throws up when there is only one item in the list - it puts the text into a macro called macroname but not macroname1.</description>
      <pubDate>Mon, 30 Nov 2009 11:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22777#M3564</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-11-30T11:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager and macros</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22778#M3565</link>
      <description>Hmm... that's ugly. One could almost call this a bug.&lt;BR /&gt;
&lt;BR /&gt;
So the macro should be coded like this?&lt;BR /&gt;
&lt;BR /&gt;
%macro list_multi_string;&lt;BR /&gt;
%if  &amp;amp;prompt_multi_string_count=1 %then&lt;BR /&gt;
   %put prompt_multi_string= &amp;amp;prompt_multi_string;&lt;BR /&gt;
%else&lt;BR /&gt;
%do i=1 %to &amp;amp;prompt_multi_string_count;&lt;BR /&gt;
   %put prompt_multi_string&amp;amp;i= &amp;amp;&amp;amp;prompt_multi_string&amp;amp;i;&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%list_multi_string</description>
      <pubDate>Tue, 01 Dec 2009 11:56:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-and-macros/m-p/22778#M3565</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-12-01T11:56:10Z</dc:date>
    </item>
  </channel>
</rss>

