<?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 Prompt Manager - multiple texts to single macro variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346544#M22925</link>
    <description>&lt;P&gt;Originally used codes&amp;nbsp;to create a macro variable:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let class = A B C;
%global class;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now tried to use Prompt Manager to achieve the same result above:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8112i87524CF811B278AF/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Screenshot - Prompt Manager" title="Screenshot - Prompt Manager" /&gt;&lt;/P&gt;&lt;P&gt;Users will be required to select from the list. If he/she selects B &amp;amp; C:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8113i658606E539657F62/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Screenshot - Prompt Manager2" title="Screenshot - Prompt Manager2" /&gt;&lt;/P&gt;&lt;P&gt;Then the value for the macro variable 'class', I hope, is "B C".&lt;/P&gt;&lt;P&gt;Clearly the Log shows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;8          %LET class0 = %nrstr(2);
9          %LET class1 = %nrstr(B);
10         %LET class2 = %nrstr(C);
11         %LET class_count = %nrstr(2);
12         %LET class = %nrstr(B);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is not what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to fix it?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 00:13:21 GMT</pubDate>
    <dc:creator>ayin</dc:creator>
    <dc:date>2017-04-03T00:13:21Z</dc:date>
    <item>
      <title>Prompt Manager - multiple texts to single macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346544#M22925</link>
      <description>&lt;P&gt;Originally used codes&amp;nbsp;to create a macro variable:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let class = A B C;
%global class;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now tried to use Prompt Manager to achieve the same result above:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8112i87524CF811B278AF/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Screenshot - Prompt Manager" title="Screenshot - Prompt Manager" /&gt;&lt;/P&gt;&lt;P&gt;Users will be required to select from the list. If he/she selects B &amp;amp; C:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8113i658606E539657F62/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Screenshot - Prompt Manager2" title="Screenshot - Prompt Manager2" /&gt;&lt;/P&gt;&lt;P&gt;Then the value for the macro variable 'class', I hope, is "B C".&lt;/P&gt;&lt;P&gt;Clearly the Log shows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;8          %LET class0 = %nrstr(2);
9          %LET class1 = %nrstr(B);
10         %LET class2 = %nrstr(C);
11         %LET class_count = %nrstr(2);
12         %LET class = %nrstr(B);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is not what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to fix it?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 00:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346544#M22925</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-04-03T00:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager - multiple texts to single macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346582#M22929</link>
      <description>&lt;P&gt;You will need a macro to resolve the user selections into a single macro variable.&lt;/P&gt;
&lt;P&gt;I have created a macro function the will resolve the values for you.&lt;/P&gt;
&lt;P&gt;You may want to enhance it, using %symexist, to check if the specified macro varable actually exists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro GetPromptValues(
  promptvar /* Name of the macro variable containing the prompt selections */);
  %let SelectedValues=;
  %do i=1 %to &amp;amp;&amp;amp;&amp;amp;promptvar._COUNT;
    %let SelectedValues=&amp;amp;SelectedValues &amp;amp;&amp;amp;&amp;amp;promptvar.&amp;amp;i;
  %end;
&amp;amp;SelectedValues
%mend;
%let NewClass=%GetPromptValues(Class);
%put NewClass=&amp;amp;NewClass;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 06:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346582#M22929</guid>
      <dc:creator>MichaelLarsen</dc:creator>
      <dc:date>2017-04-03T06:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Manager - multiple texts to single macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346584#M22930</link>
      <description>Exactly what I need. Thank you so much!</description>
      <pubDate>Mon, 03 Apr 2017 06:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Prompt-Manager-multiple-texts-to-single-macro-variable/m-p/346584#M22930</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-04-03T06:55:29Z</dc:date>
    </item>
  </channel>
</rss>

