Libname is not assigned error in SAS EG on demand

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Libname is not assigned error in SAS EG on demand

Hello,

I am new to SAS. I have installed SAS EG On demand 6.1 on my machine. All the data sets are present in Servers>SASApp>Libraries. Whichever dataset I am trying to use, it's throwing an error - ERROR: Libname <data set name> is not assigned.

I have attached the structure on data set of my system. These data set are not present on my system. Could someone please me in figuring out on how to go about it?

I also want to know how to assign a library and how to create a permanent library on my local machine because same thing is happening when I am trying to make a dataset on my local machine.

For Example. I created a folder named 'SHUB' at this location - C:\Users\Shubham\Documents and then tried to execute following code. It's givving me an error "ERROR: Library SHUB does not exist". Please help me in this.

LIBNAME SHUB 'C:\Users\Shubham\Documents\';

run;

data SHUB.TEST;

  input sal1996-sal2000 ;

  cards;

10000 10500 11000 12000 12700

14000 16500 18000 22000 29000

;

run;

Thanks.N


1.png

Accepted Solutions
Solution
‎12-13-2013 10:23 PM
PROC Star
Posts: 392

Re: Libname is not assigned error in SAS EG on demand

You will find some useful information about this in the Q&A for SAS OnDemand for Academics at support.sas.com and in particular this one:

  • Can I point to local SAS data sets or files using a LIBNAME or a FILENAME statement?No. The SAS Server is unable to access or recognize the local drives of your PC. If you write a LIBNAME statement or a FILENAME statement that references a local directory path, you will receive processing errors. If you are using SAS® OnDemand for Academics: Enterprise Guide, then you can upload the SAS data sets that you want to work with to the SAS Server. For more information, refer to the appropriate usage manuals available from the SAS® OnDemand for Academics Support Site.

View solution in original post


All Replies
Solution
‎12-13-2013 10:23 PM
PROC Star
Posts: 392

Re: Libname is not assigned error in SAS EG on demand

You will find some useful information about this in the Q&A for SAS OnDemand for Academics at support.sas.com and in particular this one:

  • Can I point to local SAS data sets or files using a LIBNAME or a FILENAME statement?No. The SAS Server is unable to access or recognize the local drives of your PC. If you write a LIBNAME statement or a FILENAME statement that references a local directory path, you will receive processing errors. If you are using SAS® OnDemand for Academics: Enterprise Guide, then you can upload the SAS data sets that you want to work with to the SAS Server. For more information, refer to the appropriate usage manuals available from the SAS® OnDemand for Academics Support Site.
New Contributor
Posts: 3

Re: Libname is not assigned error in SAS EG on demand

Thank you so much for your reply. I read the instruction and now I am able to upload a file from my machine to temporary data set 'WORK' on server. Now I have a few more questions:

1) When I am trying to read(access) data of any data set other than WORK, it's giving me an error - ERROR: Libname <data set name> is not assigned. So does that mean, we can not even read data of existing data sets present on server and we will have to create data in WORK every time we start working in Enterprise Guide?

2) Since EG can not read local machine, so does mean we won't be able to access the features like import/export and many other features going ahead.

I think, not being able to access server data sets is a hurdle in learning SAS as every time I start SAS, I will have to upload data first. I really wonder this is the only way!

Regards,

Shubham

Valued Guide
Posts: 3,208

Re: Libname is not assigned error in SAS EG on demand

SAS EG can read local data and place on a server side loaction. It has all interfaces for that. It is drag and drop filetransfer etc.

If you are using SAS-EG  on your machine on that part you would not have those limitations.

Storing data on the server-side is an other question.

One requirement is that you should be allowed to that on the server. Looks to be an open door assuming that is normal.

Could be not that normal as storing data on a server sometimes is seen as being dangerous at disturbing the machine.

I think having read SAS on Demand guidelines, there are those kind of limitations. See Pauls reference.       

---->-- ja karman --<-----
SAS Super FREQ
Posts: 8,743

Re: Libname is not assigned error in SAS EG on demand

Hi:

  Jaap is correct that IF you are running EG on your local machine -- such as at your company and SAS is on your company server, then you can use the drag and drop, file transfer, interfaces and you usually can access files on your local drive, subject to the security implemented at your company.

  However, when you use SAS OnDemand (whether the product is SAS OnDemand for Academics or SAS OnDemand for Professionals), the copy of EG that you download will *NOT* access SAS datasets from your local machine. Nor will it import from your local machine. For example, in the Programming 1 course, students learn how to use the INFILE statement to read raw data to create SAS datasets and they learn how to use PROC IMPORT. The datasets used in Programming 1 are already loaded onto the OnDemand server, so you CAN write programs to access and import the files that are *ALREADY* on the OnDemand server. But you cannot use EG import tasks with the OnDemand server to import data from your local PC. The copy of EG that you use with the OnDemand servers will *NOT* allow you to browse to data on your C: drive.

  Please refer to the FAQ that Paul posted the link for. Also refer to this OnDemand for Professionals information (SAS OnDemand for Professionals), that specifically says: "Note: SAS OnDemand for Professionals: Enterprise Guide does not have the capability for uploading of personal data. It is intended for learning purposes only; ample practice data from select courses and books is made available." The only thing that is different about SAS OnDemand for Academics is that every professor is responsible for uploading the data for his/her class to the OnDemand server for the students to access.

  Shubham commented, "2) Since EG can not read local machine, so does mean we won't be able to access the features like import/export and many other features going ahead." As I explained, to the extent that you know the location on the server, where the server version of the data resides, you can import data if you point to the server data. For example, in the screen shots attached to this posting, I navigated to the ecourses folder on the SASApp server and into the ECEG151 location  to find a CSV file that is used in the course. Here are the steps I followed. Note that the very first thing I did was assign a project library to a "user" location on the server. Every OnDemand account has a user location and you can write datasets there instead of to WORK. Every step has a screen shot name in parentheses.

1) assign user library on OnDemand server (first_assign_user_library_on_server.png)

2) File --> Import Data (next_pick_file_import_data.png)

3) Navigate to server location of data in this case, on the SASApp server, navigate to /home/<username>/ecourses/eceg151 and then pick a CSV file (step1_pick_file.png) (note that <username> is YOUR OnDemand username)

4) Save to MYUSER lib instead of WORK -- This will be the location on the server from #1 which should be in the list of libraries under SASApp server (on_import_task_save_to_user_lib.png and step1_after_select_myuser_libref.png)

5) Finish import steps (step2_import_window.png)

6) You should see the final imported file in the MYUSER library (file_imported_in_myuser_lib.png)

cynthia


first_assign_user_library_on_server.pngon_import_task_save_to_user_lib.pngnext_pick_file_import_data.pngstep1_after_select_myuser_libref.pngstep1_pick_file.png
SAS Super FREQ
Posts: 8,743

Re: Libname is not assigned error in SAS EG on demand

...posting remaining screen shots


step2_import_window.pngfile_imported_in_myuser_lib.png
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 15706 views
  • 4 likes
  • 4 in conversation