BookmarkSubscribeRSS Feed
AndersBergquist
Quartz | Level 8
I try to do a SP for the result of a questioner.
I have some background informations, variable b1 - b5 and the answers q1-q10,
I want to do one prompt there the user can choice the background information's and after that, one prompt there they can choice q1-q10.

I try to use "Data source item" but I can not filter it. I am using EG 4.2. Also, I working with infomaps which also makes problems?

Does someone have a solution? I think it is a common problem.

Message was edited by: Berga Message was edited by: Berga
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Look at the example of prompting the user for a REGION value in order to run a SP for a specific region...in this paper:
http://www2.sas.com/proceedings/forum2008/024-2008.pdf

The macro variable &REG is used to hold the selection that the user made from the stored process prompting interface. Even though there is only one parameter in the stored process example in this paper, a definition for a second parameter is easy to do. This paper shows the use of &REG in a WHERE statement for row selection purposes. However, you could just as easily have used a selection in a VAR statement or a COLUMN statement or a TABLE statement to control the columns that appear on a report.

The best recommendation I know of is to start with a working program (one that is NOT a stored process) that does what you want to do and then gradually use SAS macro variables to take the place of pieces of code (where you will subsitute the user's choices for code portions). Then once you have the revised code working with your "hard-coded" macro variables, you are ready to turn this program into a stored process and to register the stored process and parameters in the metadata.

When a user is prompted to supply information to a stored process, the prompting interface creates global macro variables which are passed to either the Stored Process Server or the Workspace Server for use when the SP is executed on the server.

To understand more about SAS macro processing and macro variables, this paper provides a good introduction:
http://www2.sas.com/proceedings/sugi28/056-28.pdf

cynthia

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 640 views
  • 0 likes
  • 2 in conversation