Date: Tue, 19 Dec 2006 07:11:05 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gary McQuown <mcquown@DASCONSULTANTS.COM>
Subject: Re: Calling SAS Macro from HTML onClick() event
Content-Type: TEXT/plain; CHARSET=US-ASCII
You can create a simple daemon by adding a sleep routine followed by an examination of the parm. If the parm has a value, it processes normally. If the parm is empty it goes back to sleep to try again when it wakes. In your case a 3-5 second routine should be fine. Also set the max number of sleep cycles so the process eventually terminates without user input.
Data and Analytic Solutions, Inc.
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
> -------- Original Message --------
> Subject: Re: Calling SAS Macro from HTML onClick() event
> From: Eivind Heioghaa <x47x@CODANMARINE.NO>
> Date: Tue, December 19, 2006 1:16 am
> To: SAS-L@LISTSERV.UGA.EDU
> Thanks for good feedback!
> You're right Don, I'm using the Stored Process Server. I have a Stored
> Process holding not only the job to be run, but also the code for
> generating a web GUI. This works just fine, and I'm building a GUI with
> chained/dependent drop down menus and various other inputs. Each section of
> the GUI is wrapped up in a macro, so that I can better control when and in
> which cases to display the specific parts of the GUI.
> Similarly the job that is taking this input as parameters, is also wrapped
> up in a macro. This job also runs without errors. The only problem is that
> I can't make it wait until the user is done performing the input, so it's
> only running for the default values provided in the GUI. As soon as my
> Stored Process sees the macro call that I've placed in the HTML for a
> button, it goes ahead and performs the work. Hence the user doesn't get to
> provide any inputs before my overly eager job is executing.
> As you pointed out, the macro is run as the HTML is generated. It seems
> like SAS finds the macro call which I've put inside the onClick event, and
> executes it as soon as it's working on that section of the SAS code
> (without waiting for an actual onClick event to occcur).
> It seems like all the pieces of the puzzle are working together as
> intended, but I just can't seem to find a way for the user to tell the
> Stored Process when to execute.
> Any pointers on how to let the users kick of the macro in the Stored
> Process would me much appreciated!
> Looking at the title of your upcoming book, I'll be heading to amazon to
> preorder it :-)