BookmarkSubscribeRSS Feed
mallika1
Calcite | Level 5

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

 

12 REPLIES 12
Anand_V
Ammonite | Level 13

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.

Ref: https://go.documentation.sas.com/?docsetId=stpug&docsetTarget=n0mbwll43n6sw3n1jhcfnx51i8ze.htm&docse...

Kurt_Bremser
Super User

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.

mallika1
Calcite | Level 5

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.

 

Kurt_Bremser
Super User

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.

Tom
Super User Tom
Super User

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.

Reeza
Super User

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.  

 

 

AlanC
Barite | Level 11

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.

https://github.com/savian-net
ballardw
Super User

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.

AllanBowe
Barite | Level 11
Should you decide to go ahead and purchase a BI server (or Viya) licence you may wish to investigate Data Controller (https://datacontroller.io).

It is exactly what you ask for (an interface for entering data) and includes:
* Data Quality rules at source
* Data Approval (sign off the changes before they are applied)
* Data Audit (who changed what, when, and why)
* Data Search (search full tables)
* Data Upload (excel or CSV)
* Data Dictionary
* Data Catalog
* Data Workflows (run SAS programs before / after data edits or approvals)
* Data Alerts (on submit, approve or reject events)
* DDL Generator
* Datalines Generator
* Data Links (to tables, subsets, or individual records)
* Data Lineage explorer (SAS 9 only)
* MetaData Explorer (SAS 9 only)

All with full SAS authorisation and authentication.
/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 12 replies
  • 2279 views
  • 10 likes
  • 8 in conversation