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 (February 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 2 Feb 2009 11:05:24 +0000
Reply-To:     karma <dorjetarap@GOOGLEMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         karma <dorjetarap@GOOGLEMAIL.COM>
Subject:      Re: Combining 3 datasets into a file row by row one after the
              other
Comments: To: chumba <vikas.dharamsattu@gmail.com>
In-Reply-To:  <19c76013-ec34-4051-832d-696d78daf43c@n33g2000pri.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

You can use set and by statements to interleve the data.

HTH

data one; input num @@; cards; 1 4 ; data two; input num @@; cards; 2 5 ; data three; input num @@; cards; 3 6 ; data combined; set one two three; by num; run; proc print;run;

2009/2/2 chumba <vikas.dharamsattu@gmail.com>: > Hey All, > > I need to combine 3 datasets into a file row by row such that first > observation from the first dataset > precedes the first row of the second dataset which inturn precedes the > first row of the third dataset and so on. > > ie. > > table1 NEW > DATASET > obs num > obs1 ------------------------------------> 1 > obs1 (table1) > obs2 > obs3 > obs4 > obs5 > > table2 > > obs1 -------------------------------------> 2 > obs1 (table2) > obs2 > obs3 > obs4 > obs5 > > table3 > > obs1 -----------------------------------------> 3 > obs1 (table3) > obs2 > obs3 > obs4 > obs5 4 > obs2 (table1) > 5 > obs2 (table2) > 6 > obs2 (table3) > > .......and so on........... > > > Can anyone please help me out on this. > > Thanks, > Vikas >


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