LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 11 Dec 2008 19:33:12 -0600
Reply-To:     Red Eagle <rdb1956@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Red Eagle <rdb1956@HOTMAIL.COM>
Subject:      loading two character variables into a list and ...
Comments: To: sas-l@uga.edu

The following code creates a SAS dataset with two variables. The first variable is used later in a combo box control. (drop down list box) The second is the location of the value of the first variable. The intention is to load a List with the first variable and create a second List for the location. The user selects there document and it opens. The SCL code loads one variable into the List. The user would select the document to view by clicking a choice shown in the combo box control. Is would likely be simpler to use only one List containing both variables. How is that done?

DATA UserChoices; INFILE CARDS DLM=','; LENGTH ListBoxDescription $ 22 FileLocation $ 90; INPUT ListBoxDescription FileLocation ; CARDS; System User Guide French, P:\UsersGuide\FRENCH.PDF System User Guide English, P:\UsersGuide\ENGLISH.PDF RUN;

SCL code . . .

Initialize: SUBMIT CONTINUE; %include "&source_folder\UserChoices.sas"; ENDSUBMIT;

dsid=open('work.UserChoices'); nlevels=0; UserChoicesListID=makelist(); rc=lvarlevel(dsid,'ListBoxDescription',nlevels,UserChoicesListID); put nlevels=; call putlist(UserChoicesListID,'levels',0); rc=close(dsid);

cmbx5_right.items = UserChoicesListID; cmbx5_right.selectedIndex = 1; RETURN;

cmbx5_right: /* User Choices Combo Box Control -- display the selected document -- */ SUBMIT CONTINUE; options noxwait noxsync; x "'P:\UsersGuide\ENGLISH.PDF'"; /* not quite this simple */ options xwait xsync; ENDSUBMIT; RETURN;


Back to: Top of message | Previous page | Main SAS-L page