BookmarkSubscribeRSS Feed
rkgrc000
Obsidian | Level 7

Our organization has the SAS Enterprise Business Intelligence Platform and we frequently use stored processes with custom input forms in the Stored Process Web Application for a variety of different purposes.  For some custom input forms, for example a form containing repeated input fields in rows and columns organized in a similar layout to a spreadsheet, we have generated the repetitive HTML code (using a "data _null_; file _webout; put '<html>all the html...</html>'; run;" kind of approach) in an outside SAS program and then manually copied and pasted that generated code into an already-created Stored Process in Management Console in order to surface the form online.  We are wondering if there would be a way to instead have one SAS program or Stored Process that, given some parameters (e.g., number and types of input fields, element id and name attribute values, input field labels, etc.), would act as a meta-level generator for other Stored Processes that would generate the Stored Process code and register the created Stored Processes in metadata so that, when one of these newly-created Stored Processes is executed, it would dynamically generate a custom input form displayed online that would fit the entered parameters.  In a sense, if I understand the term correctly, we would almost be using SAS as a content management system like WordPress or Drupal.  Does anyone have any suggestions?  Thanks!

2 REPLIES 2
AllanBowe
Barite | Level 11

Absolutely - this macro can be used to programmatically create your STP:  https://github.com/macropeople/macrocore/blob/master/meta/mm_createstp.sas

 

If your STP is destined to be a web service, you can also use this macro, which bundles in the SASjs mm_webout macro as precode.

 

for more info on building web apps with SAS checkout this SGF2020 presentation: https://slides.com/allanbowe/sgf2020

/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
ChrisBrooks
Ammonite | Level 13

I think what you want to do ought to be possible using the SAS Language Interface to Metadata - documentation here-> https://support.sas.com/documentation/cdl/en/lrmeta/70119/PDF/default/lrmeta.pdf which allows you to programatically work with metadata objects. I've used this a bit and I have to warn you it isn't going to be easy - if you decide to try it I'd strongly recommend developing on a Metadata Server specifically created for the task where you won't mind if you accidentally corrupt all the metadata....

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 863 views
  • 3 likes
  • 3 in conversation