DATA Step, Macro, Functions and more

ERROR: Libref ORION is not assigned.

Reply
New Contributor
Posts: 2

ERROR: Libref ORION is not assigned.

Hello there,

I have created the library called Orion and assigned the library to the enviornment by executing 'setup' folder under Snippet. But I am getting the error: 'Libref ORION is not assigned'. Do I need to add an 'Infile' statement?  I am trying to create a temporary data set named q1birthdays from the input data set orion.employee_payroll.

 

Please see the codes below:

 

libname orion "/folders/myfolders/ecprg193";

 

data q1birthdays;
   set orion.employee_payroll;
   BirthMonth=month(Birth_Date);
   if BirthMonth le 3;
run;%let path = Filepath;

 

Thank you for your time.

Sahib

 

Super User
Posts: 7,768

Re: ERROR: Libref ORION is not assigned.

Posted in reply to saamiqbal

If you get that error, it means that the libname statement failed. Check the spelling of the physical path; be aware that UNIX is case-sensitive.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,774

Re: ERROR: Libref ORION is not assigned.

Posted in reply to saamiqbal

Post the log so we can see the error message. 

 

Re-run the setup as well and include the log if that has errors. 

New Contributor
Posts: 4

Re: ERROR: Libref ORION is not assigned.

I am a beginner and Ihave the same problem.

 

I am following the steps in " Setup Instructions for SAS University Edition" by running below lines:

 

 

%let path=/folders/myfolders/ecprg193;
libname orion "&path"

 

But I stuck at below errors:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 %let path=/folders/myfolders/ecprg193;
63 libname orion "&path"
64
65 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
_______
22
ERROR: Libref ORION is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR 22-7: Invalid option name OPTIONS.
 
66 ODS HTML CLOSE;
67 &GRAPHTERM; ;*';*";*/;RUN;QUIT;
68 QUIT;RUN;
69 ODS HTML5 (ID=WEB) CLOSE;
70
71 ODS RTF (ID=WEB) CLOSE;
72 ODS PDF (ID=WEB) CLOSE;
NOTE: ODS PDF(WEB) printed no output.
(This sometimes results from failing to place a RUN statement before the ODS PDF(WEB) CLOSE statement.)
73 FILENAME _GSFNAME;
NOTE: Fileref _GSFNAME has been deassigned.
74 DATA _NULL_;
75 RUN;
 
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
76 OPTIONS VALIDMEMNAME=COMPAT;
77 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
78
 

 

 

 
I carefully read the instructions, but can not figure out.
 
Please kindly help.

 

 

Super User
Posts: 7,768

Re: ERROR: Libref ORION is not assigned.

As any SAS statement, the libname statement needs a closing semicolon.

Because of the missing semicolon, the following options statement is misinterpreted as (invalid) part of the libname statement.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 4

Re: ERROR: Libref ORION is not assigned.

Posted in reply to KurtBremser

Oh, such a simple mistake.

Thank you very much.

Ask a Question
Discussion stats
  • 5 replies
  • 407 views
  • 1 like
  • 4 in conversation