How to add a prompt in a do loop in SAS EG?

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

How to add a prompt in a do loop in SAS EG?

Hi all,

I am wondering if anyone can help me with a prompt problem. I need to set up a prompt in a do loop within a macro function on EG, which can allow the user selects values from a static list every time. Also, I want the prompt to be displayed after users see my proc reg results in each loop.

I tried to add a prompt in my program, it would pop up before the results come out, and the loop breaks. So help required please - how could I set up a prompt in a do loop so that it could run and update the users' choice every time?  

Thanks a ton in advance!

Ye


Accepted Solutions
Solution
‎08-25-2014 01:58 PM
Valued Guide
Posts: 3,208

Re: How to add a prompt in a do loop in SAS EG?


All Replies
PROC Star
Posts: 1,236

Re: How to add a prompt in a do loop in SAS EG?

So user will be running this code in EG?

You have a %DO loop that inside of it runs a regression, and after each iteration of the %DO loop you want to prompt the user with something like "Here are your model results, choose any variables you would like to add to the model for next iteration."  Is that right?

Interesting question.  I suppose the old WINDOW statement could have allowed something like that.

One think to wonder is if you NEED to %DO loop.  Might you be able to change the code such that the user just runs the same module (stored process) as many times as they want to iterate?

New Contributor
Posts: 3

Re: How to add a prompt in a do loop in SAS EG?

Yes, I have a %DO loop with a regression inside. So after each iteration I want to prompt something like "Do you think this model is good enough, if not, do you want to use the alternate method?". I know that %WINDOW can do it, but the problem is, I don't have BASE SAS. So I need to build something similar to %WINDOW on SAS EG.

Solution
‎08-25-2014 01:58 PM
Valued Guide
Posts: 3,208

Re: How to add a prompt in a do loop in SAS EG?

New Contributor
Posts: 3

Re: How to add a prompt in a do loop in SAS EG?

Thanks, will try it!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 269 views
  • 0 likes
  • 3 in conversation