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 (March 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Mar 2001 08:30:04 -0500
Reply-To:     Mike Tonkovich <Takeadoe@FROGNET.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Tonkovich <Takeadoe@FROGNET.NET>
Subject:      padding with zeros
Content-Type: text/plain; charset=us-ascii

I'm sure some of you will have this answered before I even log off. These are the data for a variable call X. The 1s and 0s actually represent yes and no answers, respectively to 5 questions. The general nature of the question in the survey was "check all that apply." So for the first record, the only choice that applied was the 5th one and the person answered the question with a "no." My question is as follows: I want to create 5 new variables from this 1 variable. My initital thought was to somehow pad with 0s and then use the substring function and so on. Would anybody care to offer a suggestion on how I might more effectively do this? I would greatly appreciate it. I need to do this to a dozen or so variables.

Regards,

Mike Tonkovich

0 11010 1101 111


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