Write and run SAS programs in your web browser

error while using proc import

Reply
Contributor
Posts: 31

error while using proc import


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
Grand Advisor
Posts: 16,315

Re: error while using proc import

Labels need to enclosed in quotes. 

 

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

Grand Advisor
Posts: 16,315

Re: error while using proc import

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

Contributor
Posts: 31

Re: error while using the grocery _coupons file

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

 

Community Manager
Posts: 2,599

Re: error while using the grocery _coupons file

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.

Super User
Super User
Posts: 5,970

Re: error while using proc import

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.

Post a Question
Discussion Stats
  • 5 replies
  • 198 views
  • 0 likes
  • 4 in conversation