BookmarkSubscribeRSS Feed
RustyOwens
Fluorite | Level 6

 have a question. I am have been tasked with copying an already existing SAS Solution and improving upon it. I am trying to allow the user to manage some of the tables within the solution like look up tables.  That way the application becomes self maintaining and not left to the programmers to do the heavy lifting.   My first attempt is a simple table: I just want to query from  a table named 'Company' and then display the results in an html table. In addition, I want to give the users a link to edit that name or set it as inactive. I can't get it to work. I apologize for lack of specifics. I can add code in here if it would be helpful as well  as the version of SAS if needed. 

 

code.pngData.pngresults.png

 

Thanks in advance

 

6 REPLIES 6
Reeza
Super User
Just to clarify as I suspect this is out of wheelhouse, you want the user to be able to modify the company name, AT&T for example?

User maintained forms are a pain, and I've never met a company where it was not needed 🙂
RustyOwens
Fluorite | Level 6

Yes, it is defintely out of my wheelhouse. Used to be a .net developer but doing this out of necessity. It's a long story but the solution is to match to group up organizations run by a single account. We are in the process of overhauling this system but are two years away at a minimum. The previous solution had a process with over 4000 lines of if statemennts and you had to add to it each time to needed a new item.

Quentin
Super User

The answer is "yes."  But if you want to deploy a SAS app for allowing users to maintaining data tables, I recommend taking a look at https://datacontroller.io/, created by @AllanBowe and his team.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
Tom
Super User Tom
Super User

I am not sure what you want to do.

 

If you want to use ODS HTML to generate an HTML file then just do that.

ods html body=_webout;
proc print data=national.company;
  var companyname;
run;
ods html close;

If you want to use a data step to craft your own HTML file then do that.

data _null_;
  file _webout;
  if _n_=1 then put '<html><body><table><tr><th>CompanyName</th></tr>';
  if eof then put '</table></body></html>';
  set national.company end=eof;
  html_string=htmlencode(trim(companyname));
  put '<tr><td>'  html_string +(-1) '</td></tr>';
run;
RustyOwens
Fluorite | Level 6

 OK, essentially what I am trying to create is a two column table. One with the name of the company and the other column and link to another page where I can edit that record via an html form. Are both of these items possible to do inside a SAS stored process?

Tom
Super User Tom
Super User

Yes.  There are ways to generate a link PROC REPORT.

 

See the (2) example in this article.  https://support.sas.com/rnd/base/ods/templateFAQ/links.html

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1954 views
  • 3 likes
  • 4 in conversation