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 (February 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 7 Feb 2007 22:38:06 +0000
Reply-To:   iw1junk@COMCAST.NET
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ian Whitlock <iw1junk@COMCAST.NET>
Subject:   Re: FORMAT QUESTION
Comments:   To: Arthur Tabachneck <art297@NETSCAPE.NET>

Art,

When I ran the posted code it caused errors because the FORMAT name BUYERSELLER was too long. Hence my message. You were correct that David wanted a new value rather than a new display of the value. Hence your code has the right idea. Whether the name is too long is probably a question of how the options are set and which version of SAS is being used. I was using 9.1.2

Ian

-------------- Original message ---------------------- From: Arthur Tabachneck <art297@NETSCAPE.NET> > Ian, > > While I'm sure your message is conveying a warning, I'm not sure what it > is. > > David had contacted me off-list and his concern was that the formatted > values weren't appearing when he viewed the file. I suggested creating a > new field, namely: > > DATA FINAL; > FORMAT BUYER_SELLER BUYERSELLER. ; > SET DAVEHOLD.PROPOSAL_LISTING_COUNTS; > RENAME PROPOSAL_YYMM = PROPOSAL_CREATE_DT; > RENAME NUMLISTINGSPERPROPOSAL = NUMBER_LISTINGS_PER_PROPOSAL; > RENAME NUMCOUNTSPERPROPOSAL = TOTAL_PROPOSAL_COUNTS; > buyer_seller2=put(buyer_seller,buyerseller.); > RUN; > > Would you further explain your evaluation? > Art > > p.s. Would it be too much to ask to have the current #IW rating system > explained. I was thinking about analyzing last year's posts, using it as > a factor, but realized that I don't recall ever seeing an explanation of > the rating (other that it had changed during the year). > > ----------- > On Sat, 3 Feb 2007 19:03:59 +0000, Ian Whitlock <iw1junk@COMCAST.NET> > wrote: > > >Summary: Yes, beware long descriptive names. > >#iw-value=1 > > > >The following worked for me. > > > > 120 data w ; > > 121 input buyer_seller proposal_yymm numlistingsperproposal > > numcountsperproposal > > 122 ; > > 123 list ; > > 124 cards ; > > > > RULE: > > ----+----1----+----2----+----3----+----4----+----5----+----6----+----7- > - > > --+----8----+ > > 125 1 0107 5 1 > > 126 2 0107 4 2 > > 127 . 0107 . > 20 > > 128 1 1206 1 > 12 > > 129 2 1206 6 8 > > NOTE: The data set WORK.W has 5 observations and 4 variables. > > NOTE: DATA statement used (Total process time): > > real time 0.02 seconds > > cpu time 0.02 seconds > > > > > > 130 ; > > 131 PROC FORMAT; > > 132 VALUE BUYERSEL > > 133 1 = "BUYER " > > 134 2 = "SELLER" ; > > NOTE: Format BUYERSEL is already on the library. > > NOTE: Format BUYERSEL has been output. > > 135 RUN; > > > > NOTE: PROCEDURE FORMAT used (Total process time): > > real time 0.02 seconds > > cpu time 0.02 seconds > > > > > > 136 DATA FINAL; > > 137 FORMAT BUYER_SELLER BUYERSEL. ; > > 138 SET w; > > 139 RENAME PROPOSAL_YYMM = PROPOSAL_CREATE_DT; > > 140 RENAME NUMLISTINGSPERPROPOSAL = NUMBER_LISTINGS_PER_PROPOSAL; > > 141 RENAME NUMCOUNTSPERPROPOSAL = TOTAL_PROPOSAL_COUNTS; > > 142 RUN; > > > > NOTE: There were 5 observations read from the data set WORK.W. > > NOTE: The data set WORK.FINAL has 5 observations and 4 variables. > > > >Ian Whitlock > >================ > >Date: Fri, 2 Feb 2007 15:59:16 -0800 > >Reply-To: David Fickbohm <davefickbohm@YAHOO.COM> > >Sender: "SAS(r) Discussion" > >From: David Fickbohm <davefickbohm@YAHOO.COM> > >Subject: FORMAT QUESTION > >Content-Type: text/plain; charset=ascii > > > >People, > >Can someone please tell me why this does not work? > >PROC FORMAT; > >VALUE BUYERSELLER > >1 = "BUYER " > >2 = "SELLER" ; > >RUN; > >DATA FINAL; > >FORMAT BUYER_SELLER BUYERSELLER. ; > >SET DAVEHOLD.PROPOSAL_LISTING_COUNTS; > >RENAME PROPOSAL_YYMM = PROPOSAL_CREATE_DT; > >RENAME NUMLISTINGSPERPROPOSAL = NUMBER_LISTINGS_PER_PROPOSAL; > >RENAME NUMCOUNTSPERPROPOSAL = TOTAL_PROPOSAL_COUNTS; > >RUN; > > > >the data looks like this: > >buyer_seller proposal_yymm numlistingsperproposal > numcountsperproposal > >1 0107 5 1 > >2 0107 4 2 > >. 0107 . 20 > >1 1206 1 12 > >2 1206 6 8 > > > >I am trying to change the 1s and 2s to buyer and seller. > > > >Thanks > >Dave > > > >Dave Fickbohm > > > >Use Technology to the Fullest > >1250 45th st suite 200 > >Emeryville, CA, 94608 > >510 594 4151 voice


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