Hi @Babloo
Let me first remind you of what I had told you few posts back!
Posted a month ago (112 views) | In reply to Babloo @Babloo As a SAS skilled person working with SAS Viya 3.5, My preference would be 1. Use the Task Prompts 2. Optimize my SAS data sets for querying. The Task Prompts are more mature and provides lots of functionality out of the box (Stored Process Prompting Framework). It's shortens the development time. But if you are a Web Stack Developer (Web, CSS, JS, Ajax) you may find the developing the HTML page more appealing, but you'll still need to interact with SAS skilled person, and someone who is familiar with how SAS Stored Processes used to work, as they are fundamentally provide the origin of the Task prompts. Just my 2 cents
With that said, let me remind you, I'm not a JavaScript developer either, I'm familiar with it, but don't practice/use it.
But I'm familiar with Application Design principles and I can tell you, you are going about this the wrong way!
You'll be much better off adopting MVC (Model-Viewer-Controller) App design paradigm for this quest of yours. Let me break it down for you
If all of the above is beyond/outside your skills set, then I would highly recommend you ask your management team to hire someone with those skills sets to help with achieving your projects objectives/goals.
That's all I can advise/help you with for now.
Good luck
Hi @Babloo
Need more info in order to help you out
This kind of information is important in order to properly guide/assist you
If you want to generate a static HTML file from a SAS dataset then just use a data step and the PUT statement.
See this paper as a starting point.
https://support.sas.com/resources/papers/proceedings20/4260-2020.pdf
Video @ bottom of page
@Reeza Any other references? Provided link is to build HTML app but I want to build the webpage using HTML code.
Instead of writing the HTML code, write SAS code which creates the HTML code.
filename htmlfile "path/to/your/file.html";
data _null_;
file htmlfile;
set sashelp.class end=done;
if _n_ = 1
then do;
put '<html>';
put '<head>';
/* put additional header lines, as needed */
put '</head>';
put '<body>';
put '<table>';
put '<thead>';
put '<tr>';
put '<td>Name</td>';
put '</tr>';
put '</thead>';
put '<tbody>';
end;
put '<tr>';
put '<td>' name '</td>';
put '</tr>';
if done
then do;
put '</tbody>';
put '</table>';
put '</body>';
put '</html>';
end;
run;
@Kurt_Bremser Good idea. Unfortunately, it's not helping me either. I executed your code just by chnaging the path and dataset name and all I got is below.
There were two observations and 2 variables in my dataset. Should I need to update the HTML code apart from path nad dataset name? Whether this HTML code tells how it is connected to SAS?
<html> <head> </head> <body> <table> <thead> <tr> <td>Name</td> </tr> </thead> <tbody> <tr> <td>. </td> </tr> <tr> <td>. </td> </tr> </tbody> </table> </body> </html>
@Tom Webpage which I developing using HTML code has many prompts in which few prompts are supposed to take values from SAS datasets.
Once I identified (with the help our community) the solution to access SAS tables in HTML, I want to incorporate it in my HTML code. I'm using SAS Viya to execute the SAS programs
Do you have a BI server, enabling you to use stored processes through a web interface, or do you just have a third-party web server, from which you could call SAS in batch mode?
PS: You would have saved us time and efforts if you had stated you have SAS Viya from the beginning
Look at this article Create a SAS Viya Job with a prompt using Task Prompts
Hope this helps
@AhmedAl_Attar Thanks for the reference document. However I could not see that the provided link has reference to built HTML webpage using SAS.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.