<?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 Can a Stored Process pull prompt values from an egp in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/324299#M5189</link>
    <description>&lt;P&gt;We are running SAS Enterprise Guide version 7.100.0.1966. &amp;nbsp;We have a Stored Process that we're adding to an existing Enterprise Guide Project. &amp;nbsp;The Stored Process needs to access prompt values that exist in the EGP. &amp;nbsp;We've made various attempts (such as getting the value from SASHELP.VMACRO), but the values just aren't coming through. &amp;nbsp;Can anyone provide some code examples of how this can be done?&lt;/P&gt;&lt;P&gt;Also, the host EGP produces one output table called FINALOUTPUT. &amp;nbsp;That table is the primary data source for our&amp;nbsp;Stored Process. &amp;nbsp;However, we are also getting the following error: &amp;nbsp;"WORK.FINALOUTPUT.DATA does not exist". &amp;nbsp;That table does indeed exist, but the Stored Process somehow isn't "seeing" it.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. &amp;nbsp;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2017 16:37:42 GMT</pubDate>
    <dc:creator>ScottSchaeffer</dc:creator>
    <dc:date>2017-01-12T16:37:42Z</dc:date>
    <item>
      <title>Can a Stored Process pull prompt values from an egp</title>
      <link>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/324299#M5189</link>
      <description>&lt;P&gt;We are running SAS Enterprise Guide version 7.100.0.1966. &amp;nbsp;We have a Stored Process that we're adding to an existing Enterprise Guide Project. &amp;nbsp;The Stored Process needs to access prompt values that exist in the EGP. &amp;nbsp;We've made various attempts (such as getting the value from SASHELP.VMACRO), but the values just aren't coming through. &amp;nbsp;Can anyone provide some code examples of how this can be done?&lt;/P&gt;&lt;P&gt;Also, the host EGP produces one output table called FINALOUTPUT. &amp;nbsp;That table is the primary data source for our&amp;nbsp;Stored Process. &amp;nbsp;However, we are also getting the following error: &amp;nbsp;"WORK.FINALOUTPUT.DATA does not exist". &amp;nbsp;That table does indeed exist, but the Stored Process somehow isn't "seeing" it.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 16:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/324299#M5189</guid>
      <dc:creator>ScottSchaeffer</dc:creator>
      <dc:date>2017-01-12T16:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can a Stored Process pull prompt values from an egp</title>
      <link>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/324347#M5190</link>
      <description>&lt;P&gt;Hi Scott,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My 2 cents...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From SAS Enterprise Guide (EG), you won't be able to add prompts to an existing Stored Process.&lt;/P&gt;
&lt;P&gt;(If the Stored Process is created from the EG session, you can link prompt to the SAS Program prior to the Stored Process creation)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way you can add prompts to an existing Stored Process is to use the &lt;STRONG&gt;SAS Management Console&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;From the &lt;STRONG&gt;Folders&lt;/STRONG&gt; tab, you need to navigate to the location of the Stored Process and go to its &lt;STRONG&gt;Properties&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;Then, the &lt;STRONG&gt;Parameters&lt;/STRONG&gt; tab is what you're looking for.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6683i6CE7A178AE08EAC3/image-size/medium?v=v2&amp;amp;px=-1" border="0" alt="Parameters.JPG" title="Parameters.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The name defined for the prompt will have to be referenced in your code as a macro-variable.&lt;/P&gt;
&lt;P&gt;For instance if you create a text prompt on MAKE, this is what the code would look like (take off quotes if it's a numeric value)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.cars;
where Make="&amp;amp;Make.";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't need to get a prompt when running the Stored Process and retrieve an existing value, you simply have to use the above code and reference the prompt as a macro-variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the error message you get,&amp;nbsp;&lt;SPAN&gt;"WORK.FINALOUTPUT.DATA does not exist", is your Stored Process defined to use the Stored Process Server?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As SAS Enterprise Guide uses a Workspace Server, its WORK library is unknown to the one used by the Stored Process Server, they are 2 separate SAS sessions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm thinking of 2 options for you:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; - Instead of creating the FINALOUTPUT dataset into the temporary WORK library, use a permanent one. it will need to be accessible to both Workspace and Stored Process Servers.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; - Change the definition of your Stored Process, using the SAS Management Console from the Execution tab of the Stored Process properties (and use Workspace server only, if applicable)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope that helps, enjoy!!!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;BR /&gt;Damo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 17:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/324347#M5190</guid>
      <dc:creator>Damo</dc:creator>
      <dc:date>2017-01-12T17:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can a Stored Process pull prompt values from an egp</title>
      <link>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/325811#M5191</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13934"&gt;@Damo&lt;/a&gt;. &amp;nbsp;This helps.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 21:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-a-Stored-Process-pull-prompt-values-from-an-egp/m-p/325811#M5191</guid>
      <dc:creator>ScottSchaeffer</dc:creator>
      <dc:date>2017-01-18T21:10:39Z</dc:date>
    </item>
  </channel>
</rss>

