BookmarkSubscribeRSS Feed
rishabhmehra13
Calcite | Level 5


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

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56
57 data grocery;
58
59 set class3.Grocery_coupons;
ERROR: File CLASS3.GROCERY_COUPONS.DATA does not exist.
60 label storeid= Health food store
61 size= Size of store
62 hlthfood= Health food store
63 org= Store organization
64 custid= Customer ID
65 gender= Gender
66 shopfor= Who shopping for
67 veg= Vegetarian
68 style= Shopping style
69 usecoup= Use coupons
70 week= Week
71 seq= Sequence
72 carry= Carryover
73 coupval= Value of coupon
74 amtspent= Amount spent;
75 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.GROCERY may be incomplete. When this step was stopped there were 0 observations and 15 variables.
WARNING: Data set WORK.GROCERY was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.06 seconds
 
 
76
77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
89
5 REPLIES 5
Reeza
Super User

Labels need to enclosed in quotes. 

 

Label storeID = 'Healrh Food Centre' /*rest of labels */;

Reeza
Super User

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

rishabhmehra13
Calcite | Level 5

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

 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 libname c3 '/folders/myfolders/';
NOTE: Libref C3 refers to the same physical library as G.
NOTE: Libref C3 was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders
57 data grocery;
58 set c3.grocery_coupons;
ERROR: File C3.GROCERY_COUPONS.DATA does not exist.
59 label storeid= "Health food store"
60 size= "Size of store"
61 hlthfood= "Health food store"
62 org= "Store organization"
63 custid= "Customer ID"
64 gender= "Gender"
65 shopfor= "Who shopping for"
66 veg= "Vegetarian"
67 style= "Shopping style"
68 usecoup= "Use coupons"
69 week= "Week"
70 seq= "Sequence"
71 carry= "Carryover"
72 coupval= "Value of coupon"
73 amtspent= "Amount spent";
74 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.GROCERY may be incomplete. When this step was stopped there were 0 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.11 seconds
cpu time 0.10 seconds
 
 
75
76
77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
89

 

ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Tom
Super User Tom
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 996 views
  • 0 likes
  • 4 in conversation