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 (October 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 27 Oct 2006 13:16:08 -0400
Reply-To:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:   Re: update function in sas

On Thu, 26 Oct 2006 04:17:34 -0400, Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE> wrote:

>lavanya, >there is no update function in SAS as far as I know. >I think you mean the update statement, like: > >data a; > update a b; > by var; >run; > >that thing you use instead of SET. You need at least one common key variable >in a and b (the BY-list) and the other common variables in A are replaced by >the values in B. If all variables in B are also in A and also A is the ouput >dataset, SAS can optimize that step and make a real update in place. Both >must be sorted of course.

I believe that UPDATE will never change a data set in place. If you want that to happen, use MODIFY instead of UPDATE.

MODIFY does not require that all variables in B are also in A. Of course, any newly introduced variables are not preserved in the output. But consider, for example, a DATA step that is supposed to selectively delete observations from A. B might include a variable DELETE_FLAG to control that.

MODIFY does *not* require that either A or B be either sorted or indexed by the BY variables. In fact, sorting is a dubious proposition in this situation, since any new observations will be written to the end of A and this will generally destroy the sorted-by property. On the other hand, indexing A can dramatically improve performance.

>Regards, >Gerhard > > > >On Thu, 26 Oct 2006 00:42:59 -0700, lavanya <lavenskey@GMAIL.COM> wrote: > >>hi all!! >> >>can anyone pls tel me what is the update function in sas >> >> >>thank you, >> >>lavanya


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