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 (April 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Apr 2001 01:29:26 +0100
Reply-To:     roland.rashleigh-berry@virgin.net
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roland <roland.rashleigh-berry@VIRGIN.NET>
Organization: N/A
Subject:      Re: retain statement
Content-Type: text/plain; charset=us-ascii

Annie Chang wrote: > > A very simple thing, almost feel embarassed to ask: > > data a; > input a; > cards; > 1 > 2 > ; > > data b; > input b; > cards; > 3 > ; > > data c; > merge a b; > retain b; > run; > > I wish by using the 'retain' statement I can use the > single oberservation from dataset b for all the > observations. i.e. the dataset would look like > 1 3 > 2 3 > > However, the retain statement didn't do what I > thought it would. In other words, the final dataset c > look like > > 1 3 > 2 . > > What is the better way to achieve my goal? > > Thank you!

Use proc sql to do a cartesian join.


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