Keeping users informed on the progress of any activity is not only a courtesy but is also very critical. This is especially true for SAS web based stored processes. I can run the same code and get results back as quickly as three seconds or as long as over a minute. I can not explain this inconsistency therefore I can not expect an end user to be so patient and understanding.
As a result, it is a very good idea to display a message letting the user know that the process is underway and to please wait. Failure to do so can cause the user to submit the same code multiple times.
I wanted to do this without using an image but still be able to display a good looking message with a minimal number of lines of HTML/CSS or JavaScript. To do this I utilized the great free resource, codepen.
Codepen is a cloud based service that allows users to share HTML, CSS and JavaScript code snippets. This well designed interface makes it easy to share ideas and to provide others with code they can use to better illustrate questions. Code can easily be "forked" and saved to your own pen. See below codepen that I forked from Arlina Design then made some modifications and saved - you can see it here: https://codepen.io/tbellmer/pen/aMedyM/
Here is how I used the wait message:
data _null_; file _webout; input; put _infile_; datalines4; <div id = 'pwcontainer' class='pwcontainer'> <h1 class='ctr'>Please Wait...</h1> <div class='pwfillme'> <div class='pwfillme-line'></div> </div> </div> ;;;; run; /* your SAS code goes here */ data _null_; file _webout; input; put _infile_; datalines4; <script> document.querySelector('#pwcontainer').style.display = 'none'; </script> ;;;; run;
I would love to see SAS Institute provide a service similar to codepen, maybe call it SASPen. Imagine how much easier it would be for someone to provide others actual code to test and modify directly online. Until then, we will just have to, please wait...