Last week I attended the SAS UK forum and was blown away by the possibilities of stored processes (amongst other things).
It has got me thinking about being a possible solution to a business need we have to allow editing/updating of a SAS dataset. Essentially, I want to show some of the columns in a dataset to the user via the web browser in a table, allow data to be entered into a column and then save that back to the underlying dataset.
So, am i proposing the impossible? Your advice would be greatly appreciated.
SAS 9.4 M3
You can do this.
To dig further into this, show an example of the underlying dataset and the changes you want to make in it.
Thanks for coming back.
The dataset is pretty simple, about 800 obs, 20 variables with a primary key. I want users to populate 3 numeric variables, the rest are text, I will display around 10 of the text variables to assist users.
Ideally, I'd like to show the 13 variables in a table, have the 3 numeric columns editable and have a save button to commit the changes back to the underlying SAS dataset.
Bump - Hi Kurt, do you need more info?
I'm out of office at the time, meaning also that I have no viable access to "my" server. Will come back to you.
@Kurt_Bremser I too need the same. can you please tell is there any way to editable table as an input and it has to create a report??
It's possible with JSP or html but I would like to know is that acheivable using STP??
The SAS Hot Editor @boemskats linked to looks very promising. Look into it.
Hey @arunrami have you had a look at the instructions here?
It doesn't require any configuration changes at all, just the deployment of an .spk file into Metadata, and unzipping a .zip file somewhere in your web server.
What specifically are you limited by? If you let me know I may be able to suggest an alternative.
@boemskats Seriously , I dont understand how to deploy the web app.. as mentioned in below setps. so far I have added all required STP and H54S to the the meta data server . just not sure how to proceed further to build frontend 😞
and where should I put the all the html/json files , same meta data server???
However, it IS possible to package the frontend into a service as well, and thereby bypass the need to deploy (and configure) the static content to the SAS web server. This results in some overhead during the initial load of an application, but those static files do get cached for subsequent calls.
Such a "packaged" approach is available for Data Controller (https://datacontroller.io) and a free (demo) copy is available if you are interested. It lets you modify data in a web browser, safely - with numerous integrity checks. See documentation.
Alternatively, you will need to do the following:
* stream all your html from a 'startup' stored process
* put all your JS and CSS files into dedicated stps, and call them using the `src` attribute
* convert your images to base 64 and embed them in your files
* if your js / css files have lines over 32k (quite common, esp with base64 images) you'll need to store them in metadata (or on the file system) and stream them byte for byte
@arunrami alternatively if you're after a commercially supported solution to this problem (which it sounds like you are), I recommend you check out datacontroller.io as suggested by Allan. Built with the same tech, but with a workflow + change approval process built in.
@arunrami - if you read the deployment steps, it involves deploying the stored process and configuring the h54s macro location, and then copying the dist directory to htdocs after editing h54sconfig.json. You don't need to build anything.
If you've still got issues with deployment feel free to raise an issue on GitHub and I'll get someone to help you out 🙂
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.