Your SAS programs, embedded in web apps and elsewhere

Prompts with columns

Posts: 44

Prompts with columns

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
Posts: 8,743

Re: Prompts with columns

Look at the example of prompting the user for a REGION value in order to run a SP for a specific this paper:

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:

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation