Are you expecting the "list" to be dynamic based on a current SAS file's variable content or are you intending to supply a static list of choices to generate the SAS code? An important point to consider.
Personally, I have no experience with EG, however, having searched the SAS support http://support.sas.com/ website, there is discussion in the SUGI/SGF conference paper below, related to "dynamic populated menus". References are made to differences with EG 4.1 and improved EG 4.2.
You're absolutely on target. If we went down into the Stored Process world and the BI Platform, there would be no need to code your own drop down box or your own "menus". Stored Processes that have parameters use the EG or the WRS or the SAS Add-in capabilities to prompt the user with a drop-down box or a radio button or whatever is appropriate.
You can build choices based on variable values. And with SAS 9.2 and the Platform, you can implement stored processes with cascading and dynamic prompts. It is very cool stuff, indeed.
However, with no information about whether this was a simple client/server install or whether it was a Platform usage of EG or whether we were dealing with a local install of SAS with a local install of EG, there were almost too many possibilities for the answer. Even more possibilities if someone was developing programs in EG for the programs to be used with SAS/IntrNet.
Generally drop down menus are part of an HTML form. The method that Patrick showed you for generating a button would be the same technique you'd use for generating a form. Conceptually, you'd need to develop the HTML form first before you coded it with SAS. You need to:
1) understand the HTML needed for an HTML form and a select box
2) understand what the form action should be
3) code the HTML form to contain a select box and test the form action when various selections are made.
for more information on HTML forms and select boxes, see: http://www.w3schools.com/TAGS/tag_Select.asp http://www.w3schools.com/TAGS/tag_form.asp
(Select box example from w3schools site)
4) Once your "vanilla" HTML form is working, now you know how to code the DATA step program to generate the form with SAS. At this point, you could generate the select options from data set values (instead of hard-coding them for the test).
5) Now you have to deploy and implement your SAS program that generates the HTML form. How do you plan to invoke the SAS program? Where will the SAS program live? How do you intend for your users to receive the results from the use of the HTML form with the drop down box? What SAS products/configurations/installations are needed to make this form work??? If you have one SAS program that generates the form, what is the form action going to be that returns the results??? A second SAS program? Some other program?
Just a comment: this is the type of thing -- building an HTML form using SAS -- that is frequently done with the SAS/IntrNet product (and the Application Dispatcher or htmSQL) or with a Stored Process in the Information Delivery Portal.