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?
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
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;
%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
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;
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:
You might be able to get this information from your Platform Administrator or you might need to work with SAS Technical Support on this.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.