BookmarkSubscribeRSS Feed
V_Andy
Fluorite | Level 6
Hi!
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.
3 REPLIES 3
DF
Fluorite | Level 6 DF
Fluorite | Level 6
EG has this ability built in. For example:

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

[pre]
data test;
format date1 date9.;
format date2 date9.;

date1 = "&date1."d;
date2 = "&date1."d;
run;
[/pre]

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: http://analytics.ncsu.edu/sesug/2007/HW02.pdf for more info. It'll probably explain it better than I can!

Hope that helps.
fre
Quartz | Level 8 fre
Quartz | Level 8

A late thank you for your explanation, Andy.  Better late than never.

Your explanation helped me a lot.

 

In the latest version of enterprise guide, the parameter manager is replaced and is called prompt manager, which you can find under View (and then left-under in the screen)

 

 

 

fre
Quartz | Level 8 fre
Quartz | Level 8
Sorry, I meant thank you DF instead of Andy 🙂

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3798 views
  • 1 like
  • 3 in conversation