<?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 Use prompts defined in a SAS Stored Process to define macro variables in EG programs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Use-prompts-defined-in-a-SAS-Stored-Process-to-define-macro/m-p/328323#M73298</link>
    <description>&lt;P&gt;I wish to have cascading prompts within Enterprise Guide so I created a stored process (named Select Report Institute) and added it as a task to my EG project.&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/6990i85D94A39ACDB5FEA/image-size/small?v=1.0&amp;amp;px=-1" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The prompts cascade as required and the log shows that the macro variables have been assigned correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, &lt;FONT color="#3366FF"&gt;the macro variables are not assigned when I attempt to use them from a separate program&lt;/FONT&gt; (e,g, &lt;EM&gt;Initialise Values&lt;/EM&gt;) within the EG project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional information:&lt;/P&gt;&lt;P&gt;Stored Process prompts - I have tried accessing both the input prompts and output parameters within &lt;EM&gt;Initialise Values&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stored Process SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; %global in_selected_institutes in_this_university selected_institutes this_university;
*ProcessBody;

%stpbegin;
%let selected_institutes = &amp;amp;in_selected_institutes;
%let this_university = &amp;amp;in_this_university;

%put &amp;amp;selected_institutes;
%put &amp;amp;in_selected_institutes;
%stpend;&lt;/PRE&gt;&lt;P&gt;Output form Stored Process Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;43 %stpbegin;&lt;BR /&gt;44 %let selected_institutes = &amp;amp;in_selected_institutes;&lt;BR /&gt;45 %let this_university = &amp;amp;in_this_university;&lt;BR /&gt;46 &lt;BR /&gt;47 %put &amp;amp;selected_institutes;&lt;BR /&gt;Bond University&lt;BR /&gt;48 %put &amp;amp;in_selected_institutes;&lt;BR /&gt;Bond University&lt;BR /&gt;49 %stpend;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output from &lt;EM&gt;Initialise Values&lt;/EM&gt; program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;WARNING: Apparent symbolic reference SELECTED_INSTITUTES not resolved.
26         
27         %put &amp;amp;selected_institutes;
&amp;amp;selected_institutes
28         %put &amp;amp;in_selected_institutes;
WARNING: Apparent symbolic reference IN_SELECTED_INSTITUTES not resolved.
&amp;amp;in_selected_institutes&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice on how to use cascading prompts to define macro variables within SAS EG will be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2017 04:32:31 GMT</pubDate>
    <dc:creator>mduarte</dc:creator>
    <dc:date>2017-01-30T04:32:31Z</dc:date>
    <item>
      <title>Use prompts defined in a SAS Stored Process to define macro variables in EG programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-prompts-defined-in-a-SAS-Stored-Process-to-define-macro/m-p/328323#M73298</link>
      <description>&lt;P&gt;I wish to have cascading prompts within Enterprise Guide so I created a stored process (named Select Report Institute) and added it as a task to my EG project.&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/6990i85D94A39ACDB5FEA/image-size/small?v=1.0&amp;amp;px=-1" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The prompts cascade as required and the log shows that the macro variables have been assigned correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, &lt;FONT color="#3366FF"&gt;the macro variables are not assigned when I attempt to use them from a separate program&lt;/FONT&gt; (e,g, &lt;EM&gt;Initialise Values&lt;/EM&gt;) within the EG project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional information:&lt;/P&gt;&lt;P&gt;Stored Process prompts - I have tried accessing both the input prompts and output parameters within &lt;EM&gt;Initialise Values&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stored Process SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; %global in_selected_institutes in_this_university selected_institutes this_university;
*ProcessBody;

%stpbegin;
%let selected_institutes = &amp;amp;in_selected_institutes;
%let this_university = &amp;amp;in_this_university;

%put &amp;amp;selected_institutes;
%put &amp;amp;in_selected_institutes;
%stpend;&lt;/PRE&gt;&lt;P&gt;Output form Stored Process Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;43 %stpbegin;&lt;BR /&gt;44 %let selected_institutes = &amp;amp;in_selected_institutes;&lt;BR /&gt;45 %let this_university = &amp;amp;in_this_university;&lt;BR /&gt;46 &lt;BR /&gt;47 %put &amp;amp;selected_institutes;&lt;BR /&gt;Bond University&lt;BR /&gt;48 %put &amp;amp;in_selected_institutes;&lt;BR /&gt;Bond University&lt;BR /&gt;49 %stpend;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output from &lt;EM&gt;Initialise Values&lt;/EM&gt; program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;WARNING: Apparent symbolic reference SELECTED_INSTITUTES not resolved.
26         
27         %put &amp;amp;selected_institutes;
&amp;amp;selected_institutes
28         %put &amp;amp;in_selected_institutes;
WARNING: Apparent symbolic reference IN_SELECTED_INSTITUTES not resolved.
&amp;amp;in_selected_institutes&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice on how to use cascading prompts to define macro variables within SAS EG will be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 04:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-prompts-defined-in-a-SAS-Stored-Process-to-define-macro/m-p/328323#M73298</guid>
      <dc:creator>mduarte</dc:creator>
      <dc:date>2017-01-30T04:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Use prompts defined in a SAS Stored Process to define macro variables in EG programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-prompts-defined-in-a-SAS-Stored-Process-to-define-macro/m-p/417716#M102613</link>
      <description>&lt;P&gt;I think you should check the box "Use prompt value throughout project" in the general prompt&amp;nbsp;ialog. That way the macro variable does not get deleted after the process is run.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 527px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16954i6BF3F0ED817EDDFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 10:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-prompts-defined-in-a-SAS-Stored-Process-to-define-macro/m-p/417716#M102613</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-12-01T10:37:35Z</dc:date>
    </item>
  </channel>
</rss>

