DATA Step, Macro, Functions and more

How to solve the problem Log: Libref ORION is not assigned?

Reply
Occasional Contributor
Posts: 9

How to solve the problem Log: Libref ORION is not assigned?

[ Edited ]

How to solve the problem Log: Libref ORION is not assigned?

 

I do SAS Programming 1

Orion library was defined correctly (I think)

 

This program gives Log (below)

 

proc contents data=orion._all_;

run;

 

Log:

ERROR: Libref ORION is not assigned.

NOTE: Statements not processed because of errors noted above.

NOTE: PROCEDURE CONTENTS used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

NOTE: The SAS System stopped processing this step because of errors.

58

59 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

 

 

Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

The error message is saying the ORION library doesn't exist.

 

If you're doing the online SAS Programming 1 course - go read the setup instructions and run the code again.  

 

If you ran it the first time, closed your session and started a new one you need to map the library back to the folder.

 

libname orion 'path you used previously';

 

If you absolutely think you did it correctly you can check it using the following code snippet:

 

proc sql;
select *
from sashelp.vlibnam
where libname='ORION';
quit;

 

 

Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

Thanks for the help.
I have used your program to check the Orion library right after SAS Studio launch. Log did not show a error (below). Does it mean everything is correct and Orion library was installed properly?
Thanks.
 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 proc sql;
57 select *
58 from sashelp.vlibnam
59 where libname='ORION';
NOTE: No rows were selected.
60 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
 
61
62 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
74
Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

There's a line in there that tells you that the library does not exist. If the library existed you would see the record of the library, but it doesn't exist so you don't get any results. Are you using SAS UE? If so, when you create the library via the GUI make sure to select that it's automatically added at start up. Otherwise everytime you close SAS UE you lose the library reference. 

 

NOTE: No rows were selected.

 

 

Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

Yes, I use SAS Studio University Edition.
When I create orion library again always get "A folder named "ecprg193" already exists". Does it mean orion library is has installed and exists? May be change some settings for orion library?

Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

How are creating your library?
Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

The orion library was created accordingly Setup Instructions for SAS Studio (look at the Pictures).


Orion 1.jpgOrion 2.jpg
Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

Read the set up instructions you posted in Picture 1. It explains in detail how to add the code to the Snippet library and that you have to run the snippet every time you start up SAS UE.

 

The second set of instructions also clearly identifies that you only need to run it once.

 

 

Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

The snippet "setup.sas" already exists in your snippets folder.
Do you want to replace it?

 

How to run the snippet every time when start up SAS UE?

Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

Snippets are sets of code, either commonly used or template for common tasks. For the setup.sas you'd probably drag it into your editor and run, or double click/open and run it.

For a template snippet you'll need to fill in values ie data file trying to import for the import snippet. 

 

http://support.sas.com/software/products/university-edition/faq/SAS_accessdata_Excel_xls.htm

 

Have you tried following the video tutorial series for SAS UE?

http://support.sas.com/software/products/university-edition/faq/SAS_accessdata_Excel_xls.htm

Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

[ Edited ]

Thanks for the help. I will read it.
Orion library was created accordingly Setup Instructions for SAS Studio and SAS said everything is OK. I am surprise why every program which I run has an error.

 

Can I uninstall orion library and install again?

Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

Sure, delete the folder. 

You'll find it under /SAS University Edition/myfolders/

Occasional Contributor
Posts: 9

Re: How to solve the problem Log: Libref ORION is not assigned?

Just simply Delete NOT Uninstall?
What is about Snippets? I need to Delete it also or it will be automatically deleted?
Sorry for so many simple questions, I am very new person in SAS.

Super User
Posts: 17,912

Re: How to solve the problem Log: Libref ORION is not assigned?

Delete the folder is fine. You should be able to right click on the snippet to delete it.

 

Here's a hint though - you can try things and test them out, if it breaks, start over Smiley Happy

Super User
Posts: 6,963

Re: How to solve the problem Log: Libref ORION is not assigned?

This simply means that you did not use the LIBNAME statement to assign the library in the current SAS session.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 15 replies
  • 684 views
  • 4 likes
  • 3 in conversation