BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ScottSchaeffer
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Damo
SAS Employee

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.

Parameters.JPG

 

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

View solution in original post

2 REPLIES 2
Damo
SAS Employee

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.

Parameters.JPG

 

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 917 views
  • 1 like
  • 2 in conversation