Hi:
It would be useful to see the WHOLE log, not just a single error message. I see several problems in your code.
It looks like you want to use SameDayDelivery as a CLASS variable (to set categories and see the 'YES' and 'NO' in the row dimension, perhaps?) but then you define the numeric variable in a VAR statement. Numeric variables can be used in a CLASS statement, especially when you want to use a NUMERIC variable to set categories -- this is an acceptable use in PROC TABULATE. For example, with SASHELP.CLASS. In this PROC TABULATE step, I want to use AGE to set groups, so it appears in a CLASS statement:
[pre]
proc format;
value ag_fmt 11-13 = 'Teens'
14-16 = 'Young Adults';
run;
proc tabulate data=sashelp.class;
class sex age;
var height;
table sex*age,
height*mean;
format age ag_fmt.;
run;
[/pre]
You are also using DateofSale and UnitsSold in a TABLE statement, but do not have either variable listed in either the CLASS or VAR statement. You should be receiving an error message that looks something like this:
[pre]
ERROR: The type of name (DateofSale) is unknown.
ERROR: The type of name (UnitsSold) is unknown.
[/pre]
The TABULATE documentation is very clear that ALL the variables listed in the TABLE statement must be listed in either a CLASS or a VAR statement. That's because PROC TABULATE needs to know how you intend to use the variable.
You will also have problems with the SameDayDelivery variable. It is in a VAR statement. I assume that it is a NUMERIC variable. It you want to use a format with a NUMERIC variable, then the format must be a NUMERIC format. If you look in the documentation, you will see that there are two types of formats which you can define in a VALUE statement -- character and numeric, as shown below:
[pre]
proc format;
value ag_fmt 11-13 = 'Teen'
14-16='Young Adult';
value $gend 'F' = 'Female'
'M' = 'Male';
run;
[/pre]
To use these formats, SAS would expect a format statement like this:
[pre]
format age ag_fmt. sex $gend.;
[/pre]
As someone has already explained, a format that starts with a '$' is meant to be used with a CHARACTER variable.explained in this posting:
http://support.sas.com/forums/thread.jspa?threadID=8896&tstart=0
In that previous posting, you defined 2 NUMERIC formats:
[pre]
proc format;
value prdfmt 1='Period1'
2='Period2';
value wkfmt 1='Week1'
2='Week2'
3='Week3'
4='Week4';
run;
[/pre]
But then you had a format statement:
[pre]FORMAT Period $prdfmt. Week $wkfmt.;
[/pre]
Which generated an ERROR message. The ERROR message happened because there was no reason to put a '$' in front of a NUMERIC format name. You didn't define $PRDFMT or $WKFMT, you defined PRDFMT and WKFMT. The '$' means something to PROC FORMAT and to SAS. The correct FORMST statement would have been:
[pre]FORMAT Period prdfmt. Week wkfmt.;
[/pre]
Again, I suggest you read the documentation for the CLASS, VAR and TABLE statements with PROC TABULATE to see how to use variables for analysis and variables to set categories. Then I suggest you read the documentation on how to define and use formats appropriately.
cynthia