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 (November 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 26 Nov 2010 10:53:55 -0800
Reply-To:     "Jack F. Hamilton" <jfh@STANFORDALUMNI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Jack F. Hamilton" <jfh@STANFORDALUMNI.ORG>
Subject:      Re: percent2.
Comments: To: bbser2009 <bbser2009@GMAIL.COM>
In-Reply-To:  <001801cb8d8e$a2ff1690$e8fd43b0$@com>
Content-Type: text/plain; charset=us-ascii

It doesn't work because the PERCENT format requires a minimum width of 4, as shown in the documentation.

It doesn't matter whether you can actually fit the number into the space - what matters is how the format is defined.

You can write your own format with different width restrictions using PROC FORMAT.

On Nov 26, 2010, at 9:23 , bbser2009 wrote:

> I was trying to run the code below, but ended up getting this error: Format > PERCENT specified with width out of range. > I do not quite understand this. I can use the informat percent2. for 2%, but > it is wrong to use the format percent2. to output 2%? > Any comments, please? Thanks. Max > > data temp; > input x percent2.; > cards; > 2% > ; > proc print; > format x percent2.; > run;


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