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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2804 views
  • 0 likes
  • 4 in conversation