Desktop productivity for business analysts and programmers

User Input Interface (user forms to input data)

Occasional Contributor
Posts: 13

User Input Interface (user forms to input data)

I have a script which extracts a set of information from our SAS Database using SAS EG (a combination of Data steps and Proc SQL).

If I need to change my input parameters (for examlpe data interval etc.) I must change my script manually.

Is there an oppotunity to set variable values using some sort of user forms in VBA when you just submit your script with dialog box appearing. Here you can either confirm your default values or input new ones. It allows to utilize you script for use by ordinary users who are not familiar with SAS programming.
Frequent Contributor
Frequent Contributor
Posts: 94

Re: User Input Interface (user forms to input data)

EG has this ability built in. For example:

In a blank project, create a new code object with the below:

data test;
format date1 date9.;
format date2 date9.;

date1 = "&date1."d;
date2 = "&date1."d;

Go to Tools -> Parameters Manager. Add the variables named "date1" and "date2". Set the type of both as a Date, and check the options for "Prompt at value" and "A value is required at runtime".

Go back to Project Designer, right click on the code object, and choose properties. Under parameters, hit Add, and select the two macro variables you added earlier.

Hit OK and run the project, and EG should prompt you for the values. The resulting dataset will be as selected.

You can set descriptions and other limitations if required, and even use the values in the other EG functions.

Have a look at: for more info. It'll probably explain it better than I can!

Hope that helps.
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation