BookmarkSubscribeRSS Feed
sspakh
SAS Employee

hi expert,

 

i want to build an STP with based on the user selection (screen 1) and generate another input screen (screen 2), and from the 2nd screen based on the selection, a 3rd screen will display, can it be done in STP or can only be done in html?

 

rgds

kah huat

7 REPLIES 7
ChrisBrooks
Ammonite | Level 13

It is possible to write a Stored Process which will generate HTML that allows the user to input parameters and then call another Stored Process but it's quite complicated if you've never done it before and probably something that isn't going to be teachable via a forum. Phil Mason has a number of excellent SAS Global Forum papers which you might want to check out if you're going down this route e.g. https://support.sas.com/resources/papers/proceedings16/6960-2016.pdf

sspakh
SAS Employee

hi,

thanks for the reply, I was looking for only stp without using html/xml or other, is that possible, I tried using stp to call another stp using proc but it failed

ChrisBrooks
Ammonite | Level 13

Do you mean Proc STP?

 

I used Proc STP a few years ago and found there were a few quirks with it - can you provide some information from the log to show us what the failure was?

sspakh
SAS Employee

hi,

I am following an example as follow:

proc stp program="/Shared Data/PROC STP" odsout=store ;

inputdata INDS = sashelp.class;

outputdata OUTSUBSET = work.subset_class;

inputparam FILTER = "(age<=15) and (sex='M')";

outputparam SUBSET_SZ = subset_n;

run;

%put SUBSET SIZE is &subset_n;

 

which ="/Shared Data/PROC STP" is another stp program.

 

error I get as follow:

NOTE: The stored process will execute locally.

NOTE: PROC_STP: ====== Proc STP Execution Starting ======

NOTE: PROC_STP: ====== Stored Process: /Shared Data/PROC STP ======

ERROR: STP: An error occurred preprocessing input parameters: Transient package result is not supported.

NOTE: PROC_STP: ====== Stored Process: /Shared Data/PROC STP Return Status = 1012 ======

NOTE: PROC_STP: ====== Proc STP Execution Ending ======

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE STP used (Total process time):

real time 0.15 seconds

cpu time 0.05 seconds

 

ChrisBrooks
Ammonite | Level 13

I'm not entirely certain why you're getting this error and I don't currently have access to a metadata server to try things out but try changing your Coe to read as follows (I've changed the value of outputparam). This is of course assuming the macro variable subset_n is set in the called STP

 

proc stp program="/Shared Data/PROC STP" odsout=store ;
inputdata INDS = sashelp.class;
outputdata OUTSUBSET = work.subset_class;
inputparam FILTER = "(age<=15) and (sex='M')";
outputparam subset_n;
run;
%put SUBSET SIZE is &subset_n;
SKG
Obsidian | Level 7 SKG
Obsidian | Level 7

Hi Sspakh,

 

I am getting an exact error as follow. I want to know that did you find out any solution on the same.

 

Please assist me.

 

Regards,

Sunny

Cynthia_sas
SAS Super FREQ

Hi:
It might be more productive for you to open a track with SAS Tech Support. They will need to know some information about your installation and the folder path for the stored process you want to call with PROC STP. In our Stored Process self-study class, here: https://support.sas.com/edu/schedules.html?crs=YSP2&ctry=US we have an example of using PROC STP and for our system, we needed to know the metadata user and metadata password in order to connect to the metadata server BEFORE invoking PROC STP. In addition, we had to know the exact metadata folder path for the stored process value for the program= option. Here's our class example, as shown below:

Cynthia_sas_0-1625768833503.png

You might be able to get this information from your Platform Administrator or you might need to work with SAS Technical Support on this.
Cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 7 replies
  • 1997 views
  • 0 likes
  • 4 in conversation