We are running SAS Enterprise Guide version 7.100.0.1966. We have a Stored Process that we're adding to an existing Enterprise Guide Project. The Stored Process needs to access prompt values that exist in the EGP. We've made various attempts (such as getting the value from SASHELP.VMACRO), but the values just aren't coming through. Can anyone provide some code examples of how this can be done?
Also, the host EGP produces one output table called FINALOUTPUT. That table is the primary data source for our Stored Process. However, we are also getting the following error: "WORK.FINALOUTPUT.DATA does not exist". That table does indeed exist, but the Stored Process somehow isn't "seeing" it.
Any help would be greatly appreciated. Thanks!
Hi Scott,
My 2 cents...
From SAS Enterprise Guide (EG), you won't be able to add prompts to an existing Stored Process.
(If the Stored Process is created from the EG session, you can link prompt to the SAS Program prior to the Stored Process creation)
The way you can add prompts to an existing Stored Process is to use the SAS Management Console.
From the Folders tab, you need to navigate to the location of the Stored Process and go to its Properties.
Then, the Parameters tab is what you're looking for.
The name defined for the prompt will have to be referenced in your code as a macro-variable.
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)
proc print data=sashelp.cars;
where Make="&Make.";
run;
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.
Regarding the error message you get, "WORK.FINALOUTPUT.DATA does not exist", is your Stored Process defined to use the Stored Process Server?
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.
I'm thinking of 2 options for you:
- 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.
- 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)
Hope that helps, enjoy!!!
Cheers,
Damo
Hi Scott,
My 2 cents...
From SAS Enterprise Guide (EG), you won't be able to add prompts to an existing Stored Process.
(If the Stored Process is created from the EG session, you can link prompt to the SAS Program prior to the Stored Process creation)
The way you can add prompts to an existing Stored Process is to use the SAS Management Console.
From the Folders tab, you need to navigate to the location of the Stored Process and go to its Properties.
Then, the Parameters tab is what you're looking for.
The name defined for the prompt will have to be referenced in your code as a macro-variable.
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)
proc print data=sashelp.cars;
where Make="&Make.";
run;
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.
Regarding the error message you get, "WORK.FINALOUTPUT.DATA does not exist", is your Stored Process defined to use the Stored Process Server?
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.
I'm thinking of 2 options for you:
- 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.
- 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)
Hope that helps, enjoy!!!
Cheers,
Damo
Thanks, @Damo. This helps.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: