Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating and Using Prompts in SAS® Enterprise Guide Joseph Urbi, WellPoint, Virginia Beach, VA.

Similar presentations


Presentation on theme: "Creating and Using Prompts in SAS® Enterprise Guide Joseph Urbi, WellPoint, Virginia Beach, VA."— Presentation transcript:

1 Creating and Using Prompts in SAS® Enterprise Guide Joseph Urbi, WellPoint, Virginia Beach, VA

2 Background Prompts help you create flexible and reusable SAS Enterprise Guide projects Can drive query generation, guide a user through what-if analyses, or customize output content A prompt is basically a means to capture an answer to a specific question and store it as a macro variable that is used within the EG project Can be as simple as a text box that the user types a single value into or as complex as a multi-value dynamic list that is dependent on another prompt

3 Prompt Types Text / Text RangeData Source / Data Source Item Numeric / Numeric RangeFile or Directory Date / Date RangeColor Time / Time RangeData Library Timestamp / Timestamp RangeHyperlink Dynamic List – multiple valuesVariable

4 Prompt Dialog Box

5 Using Prompts in Programs

6 Prompts in Programs

7

8 We want separate prompts for Month and Year

9 Prompts in Programs Open the Prompt Manager and press Add

10 Prompts in Programs

11

12

13 Press Add to create a new list member

14 Prompts in Programs

15

16 Now we want to associate our Month and Year prompts with the program

17 Prompts in Programs

18

19 Press Add and associate both prompts with the program

20 Prompts in Programs

21 Press Run to see the prompt

22 Prompts in Programs

23 Using Prompts In Queries

24 Prompts in Queries

25

26 We need to create the prompt before we can use in a filter

27 Prompts in Queries Press Add and create a prompt for County. Once done, return to the Query Builder dialog

28 Prompts in Queries Now we can create the filter

29 Prompts in Queries

30

31 _eg_WhereParam is a custom SAS macro used to facilitate prompts in filters

32 Prompts in Queries

33

34

35

36

37 Things To Consider You can’t really control the look and feel of the prompts and the prompt dialog Basic value checking is possible, but you can’t do complex validation For many prompt types, multiple macro variables are generated. For example, a numeric range prompt called pNum will create two macro variables called pNum_MIN and pNum_MAX You can create shared prompts that can be used in more than one EG project

38 Recommended Reading Hall, Angela. 2011. “Creating Reusable Programs by Using SAS Enterprise Guide Prompt Manager” Proceedings of the SAS Global Forum 2011 Conference. Cary, NC: SAS Institute Inc. Sucher, Kenneth. 2010. “Interactive and Efficient Macro Programming with Prompts in SAS Enterprise Guide 4.2” Proceedings of the SAS Global Forum 2010 Conference. Cary, NC: SAS Institute Inc.


Download ppt "Creating and Using Prompts in SAS® Enterprise Guide Joseph Urbi, WellPoint, Virginia Beach, VA."

Similar presentations


Ads by Google