Your SAS programs, embedded in web apps and elsewhere

Need help with interaction between HTML & SAS

Reply
New Contributor
Posts: 4

Need help with interaction between HTML & SAS

Hi all,

 

I currently have a SAS Macro that runs based on the input of a certain date.

 

What I want is a simple HTML webpage where a button-click will send the content of a textbox with input (DD-MM-YYYY) and initiate the SAS Macro.

 

I already have the SAS Macro under control, however I do not have any experience in started the Macro from HTML and input the DATE to run the Macro.

 

I have searched far and wide for a simple solution to my simple problem. Is it simply impossible to do this in a simple way without being an expert in HTML/JAVASCRIPT ?

 

Best Regards

Mads

 

Btw. this is for a student project

Super User
Super User
Posts: 7,988

Re: Need help with interaction between HTML & SAS

Posted in reply to Morgenlys

It depends on a fair few things.  What is your setup?  SAS Web Report Studio does this kind of thing.  If your doing it yourself, then you would need some kind of server setup where in your web page you would have a button that generates the system call with your date parameter.  

 

The question is why your doing this, what is the purpose behind this?  Depending on the answer to that then you can proceed looking at solutions.  For instance, is this for someone who is not technical to run a report, if so then you need to check your licensing, your setup, access etc.  And look at software for that.  If its internal, then just put the date in a text file and read it in as part of your program.

 

Am afraid its not just as simple as a web page with a textbox, otherwise we'd all be doing it Smiley Surprised)

New Contributor
Posts: 4

Re: Need help with interaction between HTML & SAS

I guess it is for external use (if, by internal you mean that only I should be able to use it), but I already made a login page leading to the page where I want the button.

 

The server setup where I would have a button on the web page with an input textbox. The buttton should generate the system call with the date parameter from the textbox.

 

 

Super User
Super User
Posts: 7,988

Re: Need help with interaction between HTML & SAS

Posted in reply to Morgenlys

Yes, see you hit a whole lot of issues there.  What do you mean a login page, is that tied to anything else.  Have you thought about data security, do you have the correct licensing to allow other people to be using SAS etc.  Not to mention the technical aspect of it, IT would need to admin this, provide a specific network are for results, logs and such like.  What type of outputs are coming back, are they in a displayable format in the web page, or will it be email etc.  I would really suggest that if this is something you want to follow, and have business need for you investigate with your IT group what is avaiable and was is required as there are plenty of web based reporting solutions out there and doing it yourself will be a big undertaking.

New Contributor
Posts: 4

Re: Need help with interaction between HTML & SAS

Maybe I asked my question in the wrong way. I simply want:

 

1) HTML page with submit button and date field

2) Javascript that activates "on click" and saves the input date

3) Javascript that activates a SAS Macro and inputs the date in the macro to run a certain scenario

4) Output as whatever in a folder on a shared drive

 

Do I run into the same problems?

Super User
Super User
Posts: 7,988

Re: Need help with interaction between HTML & SAS

Posted in reply to Morgenlys

Ah, you already have stored process, so that should make it easier.  Check out this paper:

http://support.sas.com/resources/papers/proceedings11/257-2011.pdf

New Contributor
Posts: 4

Re: Need help with interaction between HTML & SAS

I already have the HTML code with a button and a textfield with date entry and a javascript that takes the date as a variable.

 

What I wish for is a way to get the javascript to also start a SAS Script and insert the same date in the SAS Script. The SAS script should then run dependent on the date (for instance save whatever sold on date XXX to a seperate XML file)

 

I already have the SAS macro and the HTML page. I am just missing the javascript to control both Smiley Frustrated

Ask a Question
Discussion stats
  • 6 replies
  • 405 views
  • 0 likes
  • 2 in conversation