Learning SAS? Welcome to the exclusive online community for all SAS learners.

SAS Coding error; code not running

Reply
Senior User
Posts: 1

SAS Coding error; code not running

Hi,

I am trying to work on the SAS Programming 1: Essential E-course using SAS University edition.

When I tried to work on below example I am getting error:

data work.newsalesemps;
	set orion.sales;
	where Country = "AU";
run;

title 'New Employee Sales';

proc print data= work.newsalesemps;
run;

proc means data=work.newsalesemps;
	class Job_Title;
	var Salary;
run;

title;

Below is the log I get:

 

data work.newsalesemps;
66 set orion.sales;
ERROR: File ORION.SALES.DATA does not exist.
67 where Country = "AU";
68 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NEWSALESEMPS may be incomplete. When this step was stopped there were 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
69
70 title 'New Employee Sales';
71
72 proc print data= work.newsalesemps;
73 run;
 
NOTE: No variables in data set WORK.NEWSALESEMPS.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
74
75 proc means data=work.newsalesemps;
76 class Job_Title;
ERROR: Variable JOB_TITLE not found.
77 var Salary;
ERROR: Variable SALARY not found.
78 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
79
80 title;
81
82
83 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
96
Please help me with this error.
 
Thanks and regards,
Akanshya Bapat
Super User
Posts: 8,080

Re: SAS Coding error; code not running

Posted in reply to akanshya142

You are missing the ORION datasets. For hints on how to set up your example data in UE, see here: https://communities.sas.com/t5/General-SAS-Programming/How-to-access-sample-orion-star-data-files-us...

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 1 reply
  • 270 views
  • 0 likes
  • 2 in conversation