The source data comes from the standard 'sashelp.orsales' table to populate the 'product_line' dropdown list.
1 Code Block
PROC SQL
Explanation : Retrieval of distinct values from the 'product_line' column to create a string containing HTML <option> tags, stored in the 'options' macro variable.
Copied!
proc sql ;
select distinct '<option value="'||strip(product_line)||'">'||strip(product_line)||'</option>'
into :options separated by ' '
from sashelp.orsales ;
quit ;
Explanation : Writing HTML content to the '_webout' system fileref. The 'resolve' function is used to interpret macro variables (like &options generated previously, or system variables &_srvname) present in the raw data block (cards4).
<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.