This script creates an HTML page containing a submission form. It first dynamically retrieves product lines from the SASHELP.ORSALES table to build a dropdown list. The form then allows the user to select a product, an output format (HTML, PDF, CSV, RTF), and an ODS style, then submits these choices to a Stored Process hosted on a specific server.
Data Analysis
Type : SASHELP
The data feeding the dropdown list comes from the system table 'sashelp.orsales'.
1 Code Block
PROC SQL
Explanation : Selects distinct values from the 'product_line' column and constructs a string containing the corresponding HTML <option> tags, stored in the macro-variable :options.
Copied!
proc sql ;
select distinct '<option value="'||strip(product_line)||'">'||strip(product_line)||'</option>'
into :options separated by ' '
from sashelp.orsales ;
quit ;
Explanation : Writes HTML code to the reserved fileref '_webout' (web output stream). Uses the 'resolve' function to interpret the macro-variable &options within the raw data (cards4), thus integrating the dynamic product list into the HTML form.
<INPUT type="checkbox" name="_debug" value="time">Show time taken
29
30
31
<INPUT type="submit" value="Run">
32
33
34
35
36
37
;;;;
38
RUN ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.