BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
D_Z_
Obsidian | Level 7

Hello All!

 

I am running EG 7.15 HSF7 on a windows 10 ENT 19.03.  My EG connected remotely to the SAS server 9.4 M6 on a Linux server.

 

Here is what i am trying to do... i have a date range i use for many of my reports.  What i would like to do is take the date prompt for the start_date and create a %let statement that first reads the start date prompt in the project and then looks at a static table (Fiscal Dates) to find the weekly start date as well as the monthly start date ( 2 different prompts).

 

Currently i have prompts setup that i have to change weekly/monthly and its a lot of projects that i have to switch around every week.  Even if i am pointed in the right direction here i wold be very happy.  These are all projects that auto-run every day.. if i have them run automatically and I do not have to change each of the projects prompts to run the correct week beginning and monthly start date... it would save me so much time.  I have a feeling that i haven't turned up much because i am not getting the correct keywords in my search.

 

Any help would be appreciated!

 

DZ

 

Dean Zipperer

1 ACCEPTED SOLUTION

Accepted Solutions
ghosh
Barite | Level 11

So if you have a table with dates you can loop over the dates.  You do not need dynamic prompts, I'd suggest using a CALL EXECUTE construct that calls a macro and passes the date value from your table to the macro. Not seeing your data I can't be more specific, however, suggest you read this article that explains this concept really well

https://www.lexjansen.com/phuse/2014/cc/CC06.pdf 

 

Also this blog explains how this logic works

https://blogs.sas.com/content/sgf/2017/08/02/call-execute-for-sas-data-driven-programming/ 

Let me know if you have more questions

View solution in original post

6 REPLIES 6
ghosh
Barite | Level 11

Hi, 

 

I have done exactly this.  When the project is run, the user is shown a menu using the EG static prompt feature where they can input the start and end dates. 

 

Not sure what you mean in your first sentence of your third para, but since you asked to be pointed in the right direction, here is a link you may wish to read the following

https://support.sas.com/resources/papers/proceedings11/309-2011.pdf

 https://www.geraldbelton.com/post/sas-prompts/sas-prompts/ 

D_Z_
Obsidian | Level 7

Sorry for not posting sooner.  I had come across both of those papers on those links and I couldn't find what i needed to do it.. so i finally just gave up.  I was ultimately trying to save time changing prompts dates every week but it doesn't look like its going to happen right now.  I just haven't been able to find a way to do it as of yet.  I will have to dig in more when i have some additional time.

 

DZ

ghosh
Barite | Level 11

Are you just looking to have a menu pop up when you run a project to input start and end dates either manually or from a calendar?

D_Z_
Obsidian | Level 7

These projects run on a schedule via windows scheduler.  What i was trying to do was change the month starting date and the week starting date to be automatic instead of me having to open the project every Monday morning and change the week start date/and or the month start date.  I wanted it to change dates dynamically without human intervention based on a table i have set up with the fiscal dates, weeks and months.

 

DZ

ghosh
Barite | Level 11

So if you have a table with dates you can loop over the dates.  You do not need dynamic prompts, I'd suggest using a CALL EXECUTE construct that calls a macro and passes the date value from your table to the macro. Not seeing your data I can't be more specific, however, suggest you read this article that explains this concept really well

https://www.lexjansen.com/phuse/2014/cc/CC06.pdf 

 

Also this blog explains how this logic works

https://blogs.sas.com/content/sgf/2017/08/02/call-execute-for-sas-data-driven-programming/ 

Let me know if you have more questions

D_Z_
Obsidian | Level 7
This looks exactly what i need to do this. thanks so much!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1005 views
  • 1 like
  • 2 in conversation