Previous Page | Next Page

Managing Stored Process Metadata

Using Prompts

Input parameters are defined in SAS Management Console as prompts. You can add prompts or prompt groups when you are using the New Stored Process Wizard to register a new stored process or when you are viewing properties for a currently registered stored process. The following features are available with prompts:

dynamic prompts

Dynamic prompts allow the lookup of possible prompt values from a data source such as a SAS data set or information map.

dependencies between prompts

When you create a set of prompts, you sometimes want the prompts to be interrelated. You might want the values of one prompt to depend on the value that is selected for another prompt. In that case, you would want to set up dependencies between the prompts.

For example, you have a prompt whose values are the names of the divisions in your organization. You also have a prompt whose values are the names of the departments in those divisions. If you want the end user to see only the departments for the selected division, then you set the department prompt to be dependent on the division prompt. After you select a value for the division prompt, the department prompt is then populated with only the names of the departments from that division.

shared prompts and prompt groups

A shared prompt is a prompt that is stored in a shared location and that can be accessed by multiple users, applications, and software features. Prompt groups can also be shared. Sharing prompts is helpful when that prompt is complex or when you might need to reuse that prompt (perhaps in other applications or contexts). The following examples are good candidates for sharing:

  • dynamic prompts with complex configurations

  • sets of cascaded prompts

  • groups of prompts that are often reused (like chart options)

selection groups

Use a selection group when you want the user to choose from several prompt groups. Selection groups contain selection-dependent groups. Each selection-dependent group is displayed as one of the selections for its parent selection group. The contents (subgroups and prompts) of a selection-dependent group are displayed to the end user only after the user selects that group for the parent selection group. For example:

  1. A user is given a choice of Laptop or Desktop for a computer type prompt.

  2. If the user selects Laptop as the value of the computer type prompt, then the user receives prompts for Battery Type, Hard Drive Size, and Processor Speed.

  3. If the user selects Desktop as the value of the computer type prompt, then the user receives prompts for Hard Drive Size, Processor Speed, and Type of Keyboard.

When you run a stored process that contains prompts, one or more macro variables is generated for each prompt. The values that are specified for the prompts at run time are assigned to the generated macro variables. When a prompt generates more than one macro variable, suffixes such as _REL, _MIN, and _MAX are appended to the prompt name to create unique names for these macro variables. Because macro variables are limited to 32 characters in length, you must use caution when specifying a prompt name. If a suffix of _REL (4 characters long) is added to the prompt name to generate a macro variable, then you should not specify a prompt name that is more than 28 characters long. For more information about how macro variables are generated and the suffixes that are used, see the prompt Help in SAS Management Console.

For more information about input parameters in stored processes, see Using Input Parameters. For more information about how to specify values for prompt, and macro variables that are generated by prompts, see Formatting Prompt Values and Generating Macro Variables from Prompts. For more information about prompt types and defining prompts, see the prompt Help in SAS Management Console.

Previous Page | Next Page | Top of Page