data grocery;
set class3.Grocery_coupons;
label storeid= Health food store
size= Size of store
hlthfood= Health food store
org= Store organization
custid= Customer ID
gender= Gender
shopfor= Who shopping for
veg= Vegetarian
style= Shopping style
usecoup= Use coupons
week= Week
seq= Sequence
carry= Carryover
coupval= Value of coupon
amtspent= Amount spent;
run;
log
Labels need to enclosed in quotes.
Label storeID = 'Healrh Food Centre' /*rest of labels */;
You don't show your libname or proc import so I can't say what's wrong with your code, Given your subject and error
libname c3 '/folders/myfolders/';
data grocery;
set c3.grocery_coupons;
label storeid= "Health food store"
size= "Size of store"
hlthfood= "Health food store"
org= "Store organization"
custid= "Customer ID"
gender= "Gender"
shopfor= "Who shopping for"
veg= "Vegetarian"
style= "Shopping style"
usecoup= "Use coupons"
week= "Week"
seq= "Sequence"
carry= "Carryover"
coupval= "Value of coupon"
amtspent= "Amount spent";
run;
log
Did you have a step where you had to import the GROCERY_COUPONS data? If so, you need to share that log information. In the step you shared, that data set is missing and so that's the cause of this error. But we need to see what went wrong before that step.
The error message is that you are trying to set in an existing SAS dataset, but SAS cannot find the dataset that you named.
Are you sure that you have a SAS dataset of that name?
Is it possible that you pointed the CLASS3 libref to the wrong directory?
Look into the directory that CLASS3 points to and check if there is a file there named 'grocery_coupons.sas7bdat'. If you are using Unix (if you are using SAS University Edition then you ARE using Unix) then the filename must be in all lowercase latters.
Most likely the issue is with the previous step that was to create that dataset.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.