BookmarkSubscribeRSS Feed
sas001
Calcite | Level 5

hey,

     Can anyone please help me out. I am having problem in creating Library in sas university edition.

when i run this code:

libname jacky "C:/Users/JAY/Desktop/jack"; run;

log shows:

NOTE: Library JACKY does not exist.

Can anyone please help me what are proper sequential steps, Thanx

10 REPLIES 10
stat_sas
Ammonite | Level 13

Create a folder "jack" on desktop and refer that through

libname jacky "C:/Users/JAY/Desktop/jack";

"jacky" in the libname statement is used an alias to access files in folder "jack". Suppose there is a dataset "have" in folder "jack" then you can access that using

proc print data=jacky.have;

run;

sas001
Calcite | Level 5

thanx , So i did the same but still it shows library Jacky doesnt exist. So is there any steps i need to do with library before putting codes ?

stat_sas
Ammonite | Level 13

Try this to see how it works.

libname jacky "/Users/JAY/Desktop/jack";

sas001
Calcite | Level 5

thanx

jakarman
Barite | Level 11

See: https://communities.sas.com/thread/58528

Cynthia@sas did and excellent explanation as the 5-th post. See the perm library definition.

You can review the effective path settings viewing on properties files/libraries within SAS studio.

---->-- ja karman --<-----
Cynthia_sas
SAS Super FREQ

Hi:

  When you use SAS University Edition, you MUST set up access to files on your C: drive in one of 2 ways:

1) set up a shared folder location

or

2) set up a shortcuts location.

  No matter WHICH choice you make when you are using SAS University Edition you do NOT, NOT, NOT, NOT, NOT, NOT *EVER* (NOT EVER) use a C:\ drive location. Why is that? That is because your copy of SAS is a Unix copy of SAS delivered as a virtual application (vApp) that is being played by either Virtual Box or VMware Player. Unix SAS does not "know" about or know how to read directly off your personal machine. Your SAS is only able to "reach" to your C: drive through the locations you define in the Virtual Machine software. And so, those locations have to look like UNIX locations, with UNIX slashes.

  On the SAS University Edition, your LIBNAME statement would be something like this:

libname jacky  '/folders/myfolders/jack';   <-- with shared folders

OR

libname jacky2 '/folders/myshortcuts/jack2';  <--- with shortcuts

  The instructions for either shared folders or shortcuts belongs to your virtual machine player (either Virtual Box or VM Ware Player) so you have to understand how that works and do the setup. And, you have to do the setup BEFORE you test your LIBNAME statement. The difference between the 2 approaches is that with the MYFOLDERS approach #1, you MUST physically move your files to the shared folder location. With the #2 shortcut approach, you have to DEFINE the shortcut location in your Virtual Machine software and then use that shortcut name -- doesn't require moving files, but the shortcut approach seems to me a bit harder to understand conceptually.

  There are a lot of postings on the Community Forum for SAS University Edition that explain that you can NEVER use a C: drive location for your LIBNAME or INFILE statement with the SAS University Edition. See this posting as an example of INFILE usage. There may be some useful screen shots here to get you going. https://communities.sas.com/message/223452#223452

cynthia

sas001
Calcite | Level 5

Thanx a lot Smiley Happy

sas001
Calcite | Level 5

hey i have  one que, if my file name is tavr.sas7bdat and my lib name for example jack then what would be import code ?

rnmishra
Calcite | Level 5

This is how I have done on mine.

Create a folder  say abc some where in your c drive.

Then go to your virtual machine settings and click shared folder option. Then will have an option to browse the folder to share. Then point it to the folder abc you just created on c drive. I was not able to share a folder on desktop!

Once you point your shared folder -in this case abc you will have the option to name it, other wise it will name abc by default.

example  : abc " c:\abc". This is what you see on the virtual machine.>>>>(***)

Finally, you can created library as

Libname  newlib "/folders/myshortcuts/abc".

In step (***) , If you have named the shared folder as xyz "c:\abc" then you need to specify the library as

Libname  newlib "/folders/myshortcuts/xyz".

This how I made it work on mine...hope this helps.

Cynthia_sas
SAS Super FREQ

Hi:

  Your 2 level SAS name is built like this:

libname.dataset

So, if your libname is JACK and your dataset name is TAVR.SAS7BDAT, then your 2 level name should drop the file extension SAS7BDAT (because SAS knows what file extensions it can read) and

your 2 level name to use in code would be:

jack.tavr

so in a PROC PRINT program, for example, you would have something like this:

libname jack '/folders/myfolders/jackdata';   /* <--- assumes that your tavr.sas7bdat file is in this shared folder */

  

proc print data=jack.tavr;

  title 'Proc Print';

run;

    

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 14329 views
  • 3 likes
  • 5 in conversation