Help using Base SAS procedures

Read Only

Reply
New Contributor
Posts: 3

Read Only

Hello all,

I am new to the SAS website and programming in general but am very thankful to have found this discussion forum.

I have a question:

What is Read-only as it pertains to the Sashelp library and how is read-only more limited with respect to the sasuser library?

any input is appreciated.

Gabe

PROC Star
Posts: 7,356

Read Only

I think that one to have to know more in order to accurately answer your questions.

Read only means what it says: that you can only read the files, not write to them or delete them.  It is usually, if not always, set at the system level and not in SAS.

It should have the same meaning for all such directories, but the settings for read, write and delete could differ for each.

New Contributor
Posts: 3

Read Only

ok.ok. This makes some sense.

The gentleman Tim gave an answer that speaks more clearly to me, but I now see that you are coming from the same place in that the SASHELP library is read only and therefore unalterable.

One question. What do you mean by system level?

Thank you and Best Regards,

Gabe

Super Contributor
Posts: 394

Read Only

"Read-only" means that you can't change anything in in the SASHELP library. You can, however, modify the SASUSER library by adding or deleting things in it or even deleting the library itself.

New Contributor
Posts: 3

Read Only

This answer really speaks to the novice an I now understand that the read-only SASHELP library is unalterable. I guess read only makes sense now. I have now taken some beginning tutorials and have learned how to rename libraries and, also, I have learned some of the basics ways to change variable parameters and descriptions is the SAS data tables.

I believe the SASUSER library is going to be the one for me! At least initially. That being said, I am curious as to what the benifits of the SASHELP library are. Any thoughts?

Thank you Tim.

PROC Star
Posts: 7,356

Read Only

One paper you might want to read on the topic: http://www.nesug.org/proceedings/nesug00/cc/cc4008.pdf

Plus it has a number of practice datasets that are excellent for testing one's code.  In that regard, take a look at: http://www.sascommunity.org/wiki/Tip_of_the_Day:August_28

Plus, I'm sure there are a number of other things kept in the sashelp library that others will point out.

Super User
Posts: 9,662

Read Only

the benifits of the SASHELP library are  a  lot.

For example, in it, there are lots of views of dictionary(Read Only) ,Such as vtable vcolumn

which can query the information about tables and other sas members.

And also there are lots of experiment table which help you to learn SAS, and have other sas system file to boot sas.

For sasuser, there is a file profile which can customize your sas and save all the change you make to sas.

So it is better not to change or alter these files under these two libraries.

Ksharp

Contributor
Posts: 35

Re: Read Only

One problem with making SASUSER read-only is that that is where your SAS profile lives. If SASUSER is read-only then SAS can't save your preferences from session to session.

It is occasionally useful to make one of your own SAS libraries read-only temporarily, to avoid lost data from coding mistakes.

e.g. libname test "C:\test" readonly;

If you do that then SAS will not permit you to make any changes to the datasets in that library while that libname statement is in effect.

Super User
Super User
Posts: 6,495

Re: Read Only

Or conversely, the problem with allowing SASUSER to be read-write is that it is where your SAS profile lives. This means that when you open a second SAS session you do not get your normal default environment.  I normally run with the -RSASUSER option so that all of my SAS sessions start with the same settings.  You can always run one with the -NORSASUSER option when you want to make any changes to your profile.

Contributor
Posts: 35

Re: Read Only

Interesting! I had a vague understanding that you could make SASUSER read-only (but had never tried), but didn't realize that would let you share the profile between multiple sessions. I normally just use one session at a time and swear under my breath when I absent-mindedly open a second session and it complains. Thanks!

Ask a Question
Discussion stats
  • 9 replies
  • 287 views
  • 6 likes
  • 6 in conversation