sasmacrosprompt

SAS Enterprise Guide Creating Date Range Prompt


I created a date range prompt using SAS Enterprise Guide Prompt Manager. I right click the prompt to see its related macro variables.

1- I just want to run the program and select the prompt values. When I run the project, prompt screen appears. I had an excel prompt already which appears, but my second date range prompt doesn't seem.

2- I want to use the date range related macros in my code. When I right click the prompt to see its macros, a lot of options appear. I selected the first one to see what happens. (which was date_pmt_min). I chose the date type as month by the way (example: July 2024)

%let str_date = "&date_pmt_min"d;
%put start date: &str_date ;

The code above doesnt print a value to the log.

How can I see the result in log & see the prompt in prompt screen?

Thanks in advance.


Solution

  • after you created the prompt you need to assign it to a program. Follow the steps below to do so.

    Open the properties on the program

    enter image description here

    Assign the prompt via the Add Button enter image description here

    If you run the program the prompt automatically create the following variables enter image description here

    To show the values you can just use the %put function without the need to assign a new local variable. Here yu see the code and the result in the log file

    enter image description here