A guide to using prompts in SAS EG

by | Aug 16, 2012

How often do you find yourself building an EG project with the intent of changing certain filters on each run? Welcome to the world of SAS prompts – designed to take the guess work out of reminders.
Prompt Manager (found in EG’s Query Builder) is designed to create and edit prompts for use within your project. SAS prompts will allow you to define the variable selection, either through manual input or a static/dynamically populated list. The latter option allows the selection to only reflect the data available, a good idea if you have a lot of irrelevant variables to scroll through.
If you’re feeding your prompts from a data source the format of the selection is the metadata path rather than the libname.table structure. If multiple prompts are in use over subsequent queries the metadata tables just need to be set up; they are then available to be populated following the result of a previous prompt. The disadvantage with this kind of setup is each query containing a prompt must be run individually to give following prompts their corresponding variable selections – unless you use cascading prompts.
Cascading prompts will give you a few more options for dynamic variable selection. They unfortunately though can only be used within a Stored Process. When editing prompts included in a Stored Process, the ‘Dependencies’ tab gives you the capability to link the output of one prompt to the input of another. All prompts are able to be sourced from the one data table and all selections are interrelated.
Here are the links to some good papers on SAS prompts:
Creating Reusable Programs by Using SAS® Enterprise Guide® Prompt Manager
Using Dynamic and Cascading Prompts in SAS® Enterprise Guide®
Prompts can be temperamental at times when designing so if you find that it’s not working for you and you can’t see anything wrong with the setup, sometimes deleting it and creating it again works wonders!
We run regular business intelligence courses in both Wellington and Auckland. Find out more here.

Submit a Comment

Your email address will not be published. Required fields are marked *