| Date: | Mon, 8 Apr 1996 15:40:47 EDT |
| Reply-To: | Mark Shephard <100423.1105@COMPUSERVE.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Mark Shephard <100423.1105@COMPUSERVE.COM> |
| Subject: | Re: HELP - SCL POP MENU |
|
Mary,
there are a number of ways to build the list but this should do it for
you. By the way, POPMENU only makes use of lists with character values.....
/* create a list with two items.... */
MenuList = makelist();
/* first item value 'M' and name 1 */
MenuList = insertc(MenuList,'M',-1,1);
/* second item value 'F' and name 2 */
MenuList = insertc(MenuList('F',-1,2);
MenuItem = popmenu(MenuList);
/* use the name of the item to return either 1 or 2 */
/* - convert the character value to a numeric */
if MenuItem then
sex = input(put(nameitem(MenuList,MenuItem),$1.),1.);
else
sex = .;
/* dont forget to delete the list when you've finished with it */
rc = dellist(MenuList);
Okay?
Mark Shephard
An Independent SAS Consultant
Hindhead UK
|