Paper 3169-2019 How to Use JavaScript Libraries Easily with SAS® Stored Processes Philip Mason, Wood Street Consultants Ltd.

ABSTRACT Looking at , you can see a wide variety of ways to display data and interact with users. Much of what you see in a web browser is done by using a combination of HTML, CSS, and JavaScript. There are libraries of CSS and JavaScript code that provide a massive amount of functionality that we can use in our applications. Many of these libraries are free or very inexpensive. I describe some of the best libraries that I know of and how to use them with SAS®. SAS® Stored Processes enable SAS code to be run from a web browser using the SAS® Stored Process . They enable us to write SAS code that works with web technologies so that we can have SAS in the back end and HTML, CSS, or JavaScript in the front end. In this presentation, I show you how to get SAS to use these libraries to make impressive applications with SAS Stored Processes in the web browser.

INTRODUCTION The is well known to us all. Every day as we surf the web we see a range of impressive web sites demonstrating what can be done in a web browser. I have found that my clients (especially management) get used to seeing all these impressive things on the web, but are often disappointed when shown a piece of standard SAS output. The classic complaint was how tables and graphs produced by SAS didn’t look as good as EXCEL ones, or have their functionality. Of course there are things we can do in SAS to change that, and if we have access to SAS products like Visual Analytics then it isn’t a problem at all. However I am going to describe an alternate approach where we can use the power of the web and its user interface combined with the power of SAS in the backend.

WHY USE A WEB BROWSER AS A USER INTERFACE Web browsers are great pieces of software which can take a range of files and produce powerful user interfaces from them. I will make a few comments about some of the key file types but this paper won’t be going into much depth on anything except the parts relating to JavaScript libraries. So you might need to go and check some other resources such as the excellent W3 Schools web site (://www.w3schools.com), which is the best place to learn about web technologies for the beginner. HTML HTML is for defining the content of a web page. Generally you will start with some HTML, which can give you a basic layout and content for your page – such as a table with an image of a graph being displayed. There are different standards within HTML but the main thing is to ensure you are using HTML 5 which is widely supported and has great functionality. HTML is made up of tags which enable you to do many things. Here are some of the tags: •

- You can collect information from users with text fields, drop down menus, check boxes, buttons etc. Information collected on forms can then be sent to other HTML pages. •