Prev: ScientificAmerican.com: Polynomial Plot: Simple Math Expressions
Next: Observed rate ratio VS model rate ratio
From: "Keintz, H. Mark" on 28 Dec 2009 11:27 Art: You're second question was: why does a character format work even when the values-to-be-formatted (e.g. left side of the equals sign) are not quoted? Answer: Because SAS never said otherwise (or at least doesn't say otherwise now). In fact, if you go to the proc format documentation (the "Value Statement" section), you'll see a character format example with unquoted left-side values. Specifically: value $ score M=Male "(pass)" F=Female "(pass)"; More interestingly, the RIGHT side has a sequence of quoted and unquoted values. The quotes are needed to mask the special character "(" from signalling a format option (but a right paren [)] does NOT need to be masked). Apparently quotes are only needed on the right side for special characters that have meaning to the format procedure, which in addition to "(", must also include '-', ',', ';' the quote marks themselves, and probably some others I haven't investigated. But, as a matter of preserving sanity I'll be favoring quotes on the right side even if I don't need any of the special characters listed above. Regards, Mark > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of > Arthur Tabachneck > Sent: Monday, December 28, 2009 10:20 AM > To: SAS-L(a)LISTSERV.UGA.EDU > Subject: Re: Can't format names be up to 30 or 31 chars long? > > Andrew (and anyone else following this thread), > .... stuff deleted ... > > > >A secondary question is why will the format even work (although it has > >the same constaints as when written properly) when the characters to > >be formatted aren't quoted? > > > >i.e., the following also works: > > > >PROC FORMAT; > >VALUE $EDU > >A ="<12 Yrs" > >B ="12 Yrs" > >C =">12 Yrs" > >; .... more deleted ... > > > >Art > >------------ > >Earlier posts omitted for brevity. Entire thread can be found at: > >http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0912d&L=sas- > l&D=1&O=D&F=&S=&P=17728 > > > >or, in short form: http://xrl.us/bgrggf |