Help using Base SAS procedures

Creating a permanent library in SAS

Reply
Contributor
Posts: 27

Creating a permanent library in SAS

Hey All,

I have installed the university edition of SAS and learning the base programming .I have created a library using libname statement with a valid name.I can create the library but my library is not shown as a library in the library folder.Instead i can the see the library name in my folders tab.Also i can see the temp_o library in the library section with the same dataset on it.Can anyone  explain me here .I appreciate your help.

Super User
Posts: 7,761

Re: Creating a permanent library in SAS

Posted in reply to NoorulIyn

What happens when you run the libname statement in a code window?

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

Re: Creating a permanent library in SAS

Posted in reply to NoorulIyn

Please post a pic of your log and the library window.

Also, note that the libname folder statement is case sensitive since SAS UE is on a unix system.

Contributor
Posts: 27

Re: Creating a permanent library in SAS

Posted in reply to NoorulIyn

  ;

43 libname test "/folders/myfolders/test";

NOTE: Libref TEST was successfully assigned as follows:

  Engine: V9

  Physical Name: /folders/myfolders/test

Then once i close the seeion test library was not in place.it was shown under the folders tab.

Frequent Contributor
Posts: 115

Re: Creating a permanent library in SAS

Posted in reply to NoorulIyn

The libref test is basically a reference name that points to folder where your datasets reside.  The libname statement establishes a connection between your SAS windowing environment and the folder with your libref engine. When your session is open, you should be able to comfortably read and write SAS datasets in your test library that points to your folder by the name test, which perhaps all your datasets.

Use a two level reference name to read your sas datasets in your test library after running your libname statement such as libref.datasetname1, libref.datasetname2 and so on.

HTH,

Naveen Srinivasan

L&T Infotech

Super User
Posts: 19,770

Re: Creating a permanent library in SAS

Posted in reply to NoorulIyn

Unfortunately a libname does not stay between sessions using the libname statement.

If you want to create a library that exists between sessions, click on the Libraries link in SAS UE (left hand side by folders). Click Create Library, the first 'filing cabinet' and then click the box that says:

Recreate at startup - add to auto exec

There should be a way to do this via code Smiley Sad

You could also modify the autoexec file yourself and include the libname statement there.

Contributor
Posts: 27

Re: Creating a permanent library in SAS

yes i tried that way.So that is a limitation on UE or on other edition too.how does the orion library stays in the library in SASUE.

Super User
Posts: 19,770

Re: Creating a  permanent library in SAS

Posted in reply to NoorulIyn

Just to reiterate, you can create permanent libraries, place the libname code in the autoexec or use the GUI menu.

It was probably created by modifying the auto exec somehow.

AFAIK it  is a limitation in all SAS BASE/UE versions.

Ask a Question
Discussion stats
  • 7 replies
  • 299 views
  • 2 likes
  • 4 in conversation