BookmarkSubscribeRSS Feed
pope1970
Calcite | Level 5

Can anyone help me how to run and Execute Stored Process from another Stored Process.

I would greatly appreciate any help...

I know that with SAS 9.3 we can use PROC STP but don't know how to do it with version SAS 9.2 and EG 4.3.

2 REPLIES 2
BrunoMueller
SAS Super FREQ

What do you want to achieve with calling a STP from another STP?

This is not a common use case for a STP

What should the called STP return?

If you want to encapsulate functionality one often uses macro programs to do this.

A STP can be called as a web service.

You can use Proc SOAP to call a web service.

But I guess there is a simpler way to do what you want

Cynthia_sas
SAS Super FREQ

Hi,
I agree with Bruno, usually, there isn't a lot of need to have a stored process call another stored process. Instead, you might have some SAS Macro programming conditional logic to call a macro program based on some condition.

  In our Stored Process 2 class (SAS Training in the U.S. -- Creating Stored Processes Using SAS 2: Additional Topics), however, we do show an example of "chaining" stored processes for drill-down purposes. For example:

Stored Process 1 shows a list of customers and their customer ID, then, every customer's ID number is a hyperlink to Stored Process 2 that shows all the purchases made by that customer.

  For this example, the program behind Stored Process 1 has to build the appropriate URL to invoke Stored Process 2 when the person viewing the first output decides to click to drill-down to see the results of running Stored Process 2.

  So it depends on whether you want your program to call various bits of code conditionally (use Macro Programs) or whether you want the end-user to be able to interact with the stored process results in order to perform the equivalent of a drill-down.

cynthia

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
  • 1502 views
  • 0 likes
  • 3 in conversation