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 (August 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 27 Aug 2008 10:52:54 +0530
Reply-To:     Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Subject:      Re: Is there any way to change "formats" into "values"
Comments: To: duo_wan@yahoo.com
In-Reply-To:  <256621.13228.qm@web30301.mail.mud.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1

Use the function PUT. For example charvar = put(numvar,date9.) will write a character value of the date(in date9 format) represented by the number numvar. In this case, you can use your own user defined format as put(numvar,myfmt.).

On Wed, Aug 27, 2008 at 10:32 AM, duo wan <duo_wan@yahoo.com> wrote: > Hi All, > > I have one question. Say there is a simple data, > > No X > > 1 Yes > > 2 No > > this Yes and No for variable X are formats (1-Yes; 0-No). Is there any function to create another variable X1 with Yes/No as character values? > > No X X1 > > 1 Yes Yes > > 2 No No > > > My real data are much more complicated so writing "if..then.." is last thing I will do. Any SAS functions? > > thanks, > > Vincent >


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