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 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 Mar 2010 10:44:18 -0500
Reply-To:     msz03@albany.edu
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Zdeb <msz03@ALBANY.EDU>
Subject:      Re: Proc Format
Content-Type: text/plain;charset=iso-8859-1

hi ... the two responses I've seen thus far are all about checking the format you created, but unless I missed it, you are not even using the format in PROC TABULATE

if I make the variable DELIVER a CHARACTER variable in the following ...

data test; input deliver : $1. @@; datalines; 1 2 1 2 ; run;

proc tabulate data=test; VAR deliver; TABLE deliver* (MEAN STD MIN MAX); ; run;

I get the same error that you got ... in the LOG ...

244 proc tabulate data=test; 245 VAR deliver;

ERROR: Variable deliver in list does not match type prescribed for this list.

246 TABLE deliver* (MEAN STD MIN MAX); 247 ; 248 run;

so, I don't think that it's the format ... SAMEDAYDELIVERY must be a CHARACTER variable in your data set and you can't use it in TABLUATE as an analysis variable and compute summary statistics

once you fix that, also fix the format ...

PROC Format; VALUE SameDayDelivery 1 = 'Yes' 2 = 'No'; RUN;

and then, I guess you want to use it in TABULATE, but I don't see it here in your posting ...

/*Proportion of daily transactions that qualify for same day > delivery*/ proc tabulate data = weekly_sales_revenues f = comma6.; CLASS LaptopModel ; VAR SameDayDelivery ; LABEL SameDayDelivery='Same Day Delivery'; TABLE DateofSale*SameDayDelivery ALL='Total'*LaptopModel all='Total', UnitsSold * ( MEAN STD MIN MAX sum='Sold'*f=8. pctsum<SameDayDelivery all>='in %'*f=comma5.1) /box=[label="Daily Transactions"] ; run;

-- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475

> Hello , > > Could anyone please help me in the code error.I use :- > > PROC Format; > VALUE $SameDayDelivery 1 = 'Yes' > 2 = 'No'; > RUN; > > /*Proportion of daily transactions that qualify for same day > delivery*/ > proc tabulate data = weekly_sales_revenues f = comma6.; > CLASS LaptopModel ; > VAR SameDayDelivery ; > LABEL SameDayDelivery='Same Day Delivery'; > TABLE DateofSale*SameDayDelivery ALL='Total'*LaptopModel all='Total',UnitsSold > *( MEAN STD MIN MAX sum='Sold'*f=8. pctsum<SameDayDelivery all>='in > %'*f=comma5.1) > /box=[label="Daily Transactions"] > ; > run; > > Error - > > ERROR: Variable SameDayDelivery in list does not match type prescribed > for this list. > > kindly suggest I need to find the proprtion of the Yes and No in > SameDayDelivery >


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