BookmarkSubscribeRSS Feed
Morgenlys
Calcite | Level 5

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

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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 🐵

Morgenlys
Calcite | Level 5

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.

 

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Morgenlys
Calcite | Level 5

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?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

Morgenlys
Calcite | Level 5

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 :S

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1061 views
  • 0 likes
  • 2 in conversation