```Date: Wed, 2 May 2007 14:35:52 +0000 Reply-To: toby dunn Sender: "SAS(r) Discussion" From: toby dunn Subject: Re: Help with concatenation problem Comments: To: schant508@hotmail.com In-Reply-To: <200705021409.l42CV7kT025631@mailgw.cc.uga.edu> Content-Type: text/plain; format=flowed The question is are these data step or macro varibales, it does make a difference: DAta Step Varibale: Data Have ; var11 = 'A' ; var12 = 'B' ; var13 = 'C' ; var21 = 'D' ; var22 = 'E' ; var23 = 'F' ; var31 = 'G' ; var32 = 'H' ; var33 = 'I' ; Grp1 = CatX( '_' , Of Var1: ) ; Grp2 = CatX( '_' , Of Var2: ) ; Grp3 = CatX( '_' , Of Var3: ) ; Put _All_ ; Run ; Toby Dunn You can see a lot by just looking. ~Yogi Berra Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell From: Sekxanh Chanthaboury Reply-To: Sekxanh Chanthaboury To: SAS-L@LISTSERV.UGA.EDU Subject: Help with concatenation problem Date: Wed, 2 May 2007 10:09:20 -0400 I have 9 variables created dynamically by the following code: var11 var12 var13 var21 var22 var23 var31 var32 var33 %do i = 1 %to &tot_obs; %do j = 1 %to &tot_obs; var&i&j = " "; %end; %end; I would like to create three new concatenated variables: grp1 = var11 || var12 || var13; grp2 = var21 || var22 || var23; grp3 = var31 || var32 || var33; Of course this all has to be done dynamically. Anyone have any ideas??? Thank you. Regards, Sekxa _________________________________________________________________ The average US Credit Score is 675. The cost to see yours: \$0 by Experian. http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE ```

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