BookmarkSubscribeRSS Feed
LAP
Quartz | Level 8 LAP
Quartz | Level 8
When I define a stored process in SMC, I group parameters that the SP will use. The parameters on a tab, are arranged in order of importance and the groups of parameters correspond to a step in a multistep process. However, If I wish to insert a parameter into a group, or move a parameter from one group to another the only way that I can find is to start all over. Is it possible to move parameters around between groups and within groups? Is there a file somewhere that stores stored process that might be modifiable? Is this something that has improved in 9.2?

Also is it possible to assign a default value to a parameter based on a function.
For instance a default value might be today()?

Another nagging question is How do you decide when it is appropriate to define using stored process server, and when do you use it with workspace server.

I can't find any good documentation for this(stored processes) so if anyone has a link I would be very greatful.

Thanks
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
You'd have to check with Tech Support about your first question and the ability to rearrange parameters in a group or tab.

As for assigning a default value, you can always assign a value to a parameter -- in your program -- in a %LET statement or inside a macro program conditional %IF test:
[pre]
%let parm1 = %sysfunc(today(),mmddyy10.);

[/pre]

The Stored Process server and Workspace server have different capabilities. Some differences are:
1) Streaming output -- possible on the SP server; not possible on the WS server
2) Multiple value parameters (such as pick 3 values for a parameter) -- possible on the SP server; not possible on the WS server;
3) Your SP is populating data for an information map -- that SP must run on the WS server.

There are other differences, which are outlined in the stored process documentation, some of which you can find here:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/result.html
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/program.html
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/program.html#choose
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/input.html

You will also want to check the Platform Administrator's guide for particular server differences and the SAS Integration Technologies documentation about stored processes.

cynthia
Vince_SAS
Rhodochrosite | Level 12


Using the SAS Management Console in SAS®9.2, you can move prompts within groups and also move a prompt from one group to another.


The attached file "PromptGroup1.png" shows a stored process that has several prompts and prompt groups. With the prompt named "simple_int" selected, note that I can use the "Move Down" button on the right side of the panel to change the location of the prompt within the prompt group. The "Move Up" button is disabled because the prompt is already at the top of the group.


To move a prompt to another group, select the prompt and either double-click it, or click the "Edit..." button on the right side of the panel. The resulting dialog is shown in attached file "PromptGroup2.png". To move the prompt to a different group, select the desired group from the "Parent Group" drop-down list. Here the top group, "Parameters", is being selected. Click OK to save your selection.


The attached file "PromptGroup3" shows that the prompt "simple_int" has been moved from the "numeric" group to the bottom of the "Parameters" group. You may now change the location of the prompt in this group by using the "Move Up" button.


Also in SAS®9.2, you can choose "commonly used" values for date and time prompts, as shown in attached files "DatePrompt.png" and "TimePrompt.png", respectively.


Similar functionality is available if you are using SAS Enterprise Guide 4.2.


To use a function as a default value of a prompt, try this:


1. Create a stored process with a text prompt named "DATE" with a default value "%sysfunc(today())".


2. Use this SAS code:



[pre]
*ProcessBody;

data test;
do i = 0 to 5;
thedate = today() + i;
output;
end;
run;

%STPBEGIN;

data _null_;
call symput('DATE', resolve("&DATE"));
run;

title "The value of DATE is &DATE";
proc print data=test;
where (thedate eq &DATE);
run; quit;

%STPEND;
[/pre]


When you execute the stored process, the PRINT procedure should display only the first observation.

Vince DelGobbo
SAS R&D
LAP
Quartz | Level 8 LAP
Quartz | Level 8
Vince,

I don't see the attachments. What am I missing?

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