Hi Team,
I need to create a front end screen to user ,where he can enter details ( like file name , SAS program to run , month , year) to create a report using BASE and Advanced SAS.
Could any one give me some ideas how to do this.
Thanks in Advance
Hi @mallika1
Yes, its possible. Here is an example for the same https://github.com/macropeople/sasjs
It also has a demo video https://vimeo.com/393161794
You can also use SAS Stored Process to do this. From your front-end you can call a STP code for processing and respond back with results.
Turn your SAS programs into stored processes, assign prompts to them for the needed inputs, and then users can select the STP's from the stored process web interface, after which they will be prompted for the required values.
Thank you for giving ideas,
Are we need separate licence to install SAS Stored process, because we have only base and advance SAS licenses. As SAS stored process is a SAS BI tool, i think we need to have separate license for it . Could you please conform on this.
I thought that you meant a BI server installation by using the term "Advanced SAS", as "Advanced SAS" is not the name of any SAS module.
If you do not have a BI server, you will need to set up your own web server, web application server and server pages and/or HTML with javascript to make this work. At least you will need to use the apache CGI gateway to run your SAS programs from the commandline, and return the output to the browser.
If you just have base SAS and are using Display Manager then you can do some simple forms using WINDOW or %WINDOW commands. If you have SAS/FSP then you can make more complex forms, but not sure SAS is really supporting SCL any more.
Otherwise build your form using any tool you want and store the results into a format that your SAS code can read. So just have the user interface outside of SAS and then call the SAS program from command line.
Do you have SAS EG or Studio?
If EG you can build prompts and prompt screens, in Studio you can build a custom task. In EG you can also build custom tasks.
SAS Base doesn't have a ton of easily interactive components but EG/Studio do have options that are relatively easy to customize. EG prompts are probably the easiest option, followed by a custom task.
Depending on the skill sets of the users you could also start with well defined macros they need to fill in the parameters for at the top of the program and then run as is. But then you have to build in a lot of checks to ensure the parameter is set up correctly.
I have built numerous front-ends for SAS. A couple of thoughts on UIs and SAS. AF/FSP/SCL are effectively dead. Hence, no need to use them. They will work but you are dealing with old/old (last century) technology. Stored processes in SAS are so simplistic that they are useful in only limited circumstances.
SAS datasets can be read using the IntTech local provider. It is free on the SAS download site.
First decision is Windows or web. Windows is easier since the technology is very robust and well supported. Web is fine but you have to get used to the model. I do Microsoft technology so here are my recommendations (in all cases, use .NET Core 3.1+ (new) and C#).
1. Download Visual Studio Community Edition (free)
- Read any article on how to create your first Hello WinForm app. Loads of examples. Again, use .NET Core 3.1+
- Read SAS dataset into a .NET dataset and display it in a grid.
2. Web
- Do the exact same thing but choose a web type. You can use HTML5 and a JavaScript framework of your choice (React,Node, etc.). I wouldn't choose any JS framework, however, in a green field application. Instead, I would choose Blazor.
I have posted a number of examples on the web for how to read a SAS dataset using .NET. Chris Hemendinger also posts a lot of details. It is easy to do just unfamiliar at first. Once you can do some basics, every UI thing you have ever seen is possible.
Thank You
It may help to provide some information such as how much data is involved such as number of variables (columns) and observations plus how the data is to be used.
If you are talking about large quantities of data for analysis solutions are likely to be different than for 5 or 6 variables used to control a program.
For small amounts of data that go into a data set I have used the Viewtable in Display manager in form view. But that generally was only for editing a could of fields or entering a dozen or so records of not many values as it is a tad clunky. But at least part of Base SAS.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.