LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 19 Jun 1997 07:26:37 EDT
Reply-To:   Ivan Son <son_ivan@EUROCLEAR.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Ivan Son <son_ivan@EUROCLEAR.COM>
Subject:   Re: Creating a SAS data set from list box selections.
Content-Type:   Text/Plain

Hi Tim,

There are many ways to do what you described. Here is one, if your list box is filled with an SCL List :

call notify ("MYLISTBO","_GET_NSELECT_",maxsel); /* get number of selections */ if maxsel > 0 /* if element(s) selected */ then do; dsid = open("lib.data","U"); /* open dataset in update mode */ do i = 1 to maxsel ; /* loop on selected elements */ call notify ("MYLISTBO","_SELECTED_",i,row); /* get row of selected element */ rc = append(dsid); /* create new record in dataset*/ call putvarc(dsid,varnum(dsid,"myvar"), /* put in myvar ... */ getitemc(methlis,row)); /* ... selected element */ rc=update(dsid); /* update new record */ end; dsid = close(dsid); /* close dataset */ end;

------------------------------- Ivan SON LACO Information Services n.v. Zaventem (Belgium) -------------------------------


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