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 (February 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 13 Feb 2008 17:35:17 -0500
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: Please help with my coding problem!
Comments:   To: Xuhong <zhuxuhong2000@gmail.com>
In-Reply-To:   <403f5a96-a9e5-4e93-8a5d-c15c4a00e0ca@i7g2000prf.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

I don't see a problem with the code you posted. I may be there but I don't see it.

Can you post a bit of the log. The only think I can think of that might be wrong is with &charvar.

On Feb 13, 2008 5:31 PM, Xuhong <zhuxuhong2000@gmail.com> wrote: > Thank very much for your quick response. Here is the reason why I am > doing this. We did a survey by two methods. One is from online and > another part is by paper. For paper part, they scanned each answers > into four numbers and I need to translate the 4 numbers back to the > original meanings. Then I could merge the two parts together. > > Just now, I tried your codes and it works for my example. However, my > original part didn't work. I changed the dataset name and I don't need > to change the work directory since it is there. > > I thought my original logic is very similar to yours. However, the > weird thing is my results always only show length four. > > Here is my codes: > > Proc contents data=Pap_New2 out=temp (keep=name type) ; > run; > > proc sql noprint; > select trim(name) > into :charvar separated by ' ' > from temp > where type=2; > quit; > > %put NOTE: name=&charvar; > > data Pap_New3 (drop=i); > length &charvar $50; > set Pap_New2; > array a(*) _character_; > do i = 1 to dim(a); > a[i]=put(a[i], $type.); > end; > run; > > I really don't understand what's the problem here. It is so weired... >


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