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 (July 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, 9 Jul 2008 22:29:09 -0700
Reply-To:     Patrick <patrick.matter@GMX.CH>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Patrick <patrick.matter@GMX.CH>
Organization: http://groups.google.com
Subject:      Re: covvert cell content into rows and columns
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

May be something like that?

data example; array cols {3} $20 col1-col3; var="Less than a year,1.25 day per month of service,;1-2,15 days,; 3-12,20 days,3;13-21,25 days,6;22-27,30 days,2;28+,35 days,";

RowNum=1; RowString=scan(var,RowNum,';'); do while(RowString ne ''); do ColNum=1 to dim(cols); cols{ColNum}=scan(RowString,ColNum,','); end; output; RowNum+1; RowString=scan(var,RowNum,';'); end; run; proc print; run;


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