Tag: javascript

Creating a React web app using SAS Viya

From articles I’ve read on the web, it is clear that data is gold in the twenty-first century. Loading, enriching, manipulating and analyzing data is something in which SAS excels. Based on questions from colleagues and customers, it is clear end-users are willing to display data handled by SAS outside […]

Creating a React web app using SAS Viya was published on SAS Users.

Sortable tables in SAS

This is an update of my previous post Make all SAS tables sortable in the output HTML
Previously I manually added the sortable plugin to the SAS output. With the PREHTML statement of PROC TEMPLATE, the sortable HTML template now can be automately saved for the future use.
/* 0 -- Create the sortable HTML template */
proc template;
define style sortable;
parent=styles.htmlblue;
style body from body /
prehtml='
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="http://cdn.jsdelivr.net/tablesorter/2.0.5b/jquery.tablesorter.min.js"></script>
<script>
$(document).ready(function( ) {
$(".table").tablesorter({widgets: ["zebra"]});
});
</script>
';
end;
run;

/* 1 -- Make all the tables sortable */
ods html file = 'tmp.html' style = sortable;
proc reg data=sashelp.class;
model weight = height age;
run;
proc print data=sashelp.class;
run;
While we explore the data or we like to change the order of SAS’s output tables, we only need to click the table heads, which is quite convenient.

Use MongoDB as a JSON factory

MongoDB is a persistent data store for JSON formatted data, which seems like an ideal middleware between the data tier software and the web. With MongoDB, Javascript’s Map/Reduce functionality makes many trivial jobs particularly easy, such …