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 (May 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 May 2004 15:05:57 -0400
Reply-To:     Kevin Roland Viel <kviel@EMORY.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kevin Roland Viel <kviel@EMORY.EDU>
Subject:      Re: a question of data manipulate.
In-Reply-To:  <339066a0.0405201007.162854ed@posting.google.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII

June ,

You have not specified how to assign the values. You example suggest that a simple array will suffice, however you state that the values of the index range from 1 to 12. If they only ranged from 1 to 3, the following would work:

data June ( drop = Q3A Q3B ) ; array Q3A_( 3 ) ; array Q3B_( 3 ) ; input first second Q3A Q3B ; Q3A_( first ) = Q3A ; Q3B_( first ) = Q3A ; datalines ; 1 2 3 4 1 2 6 10 1 2 5 3 2 4 6 4 2 4 7 8 2 4 4 5 3 7 3 7 3 7 1 6 3 7 5 8 3 7 4 9 ; run ;

Another common suggestion employs a MERGE statement with the data set appearing as many times a necessary each with a specific data set WHERE and RENAME option. However, you may want to provide further clarification.

Good luck,

Kevin

Kevin Viel Department of Epidemiology Rollins School of Public Health Emory University Atlanta, GA 30322


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