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 (January 2012, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Jan 2012 09:36:16 -0500
Reply-To:     "Bian, Haikuo" <HBian@FLQIO.SDPS.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Bian, Haikuo" <HBian@FLQIO.SDPS.ORG>
Subject:      Re: Concatinating Observations
Comments: To: Mallikarjuna G <mallisw@gmail.com>
In-Reply-To:  <201201171405.q0H4qP4d026747@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Here is the one field version with separator '+';

data want (drop= id _:); length id_c $100.; retain id_c; do _i=1 to 5 until (last); set raju end=last; array _id(*) _id1-_id5; _id(_i)=id; id_c=catx('+',id_c,_id(_i)); end; output; call missing(id_c); run;

proc print;run;

Regards, Haikuo

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mallikarjuna G Sent: Tuesday, January 17, 2012 9:06 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Concatinating Observations

Hi ,

Below is the dataset;

data raju; input id 1-10; cards; 9573806190 9573806191 9573806192 9573806193 9573806194 9573806195 9573806196 9573806197 9573806198 9573806199 9573806200 9573806201 9573806202 9573806203 9573806204 9573806205 9573806206 9573806207 9573806208 9573806209 9573806210 ; run;

i wanna select upto 5 observations into another dataset as one row ;

Eg.. demo 9573806190+9573806191+9573806192+9573806193+9573806194 9573806195+9573806196+9573806197+9573806198+9573806199 ; ----------------------------------------- Email messages cannot be guaranteed to be secure or error-free as transmitted information can be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The Centers for Medicare & Medicaid Services therefore does not accept liability for any error or omissions in the contents of this message, which arise as a result of email transmission.

CONFIDENTIALITY NOTICE: This communication, including any attachments, may contain confidential information and is intended only for the individual or entity to which it is addressed. Any review, dissemination, or copying of this communication by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message.


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