DATA Step, Macro, Functions and more

ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Hi I am getting this error while giving the above code. I am using SAS in mac through virtual box.


Accepted Solutions
Solution
‎12-15-2015 11:06 PM
Super User
Posts: 9,681

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

If you are using Univerisity Edition. You can not write sas table into SASUSER.

Show us your code :

 

 

View solution in original post


All Replies
Super User
Posts: 5,256

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Do you get this independent of data set?

Perhaps the -RSASUSER option i set.

Data never sleeps
New Contributor
Posts: 4

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

This was my first code..Smiley Sad And i am stuck at the first step
Trusted Advisor
Posts: 1,115

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

First of all: Welcome to the SAS Support Communities!

 

Never say die! There are so many experienced SAS programmers active in this community, that you will almost certainly get sufficient support to overcome your initial difficulties with SAS. It's just a steep learning curve.

 

Issues, like yours, with access permissions can really be annoying. @LinusH's idea could already explain why you cannot write to the SASUSER library. In fact, I cannot do that either, because -RSASUSER is one of the SAS system options I set at SAS invocation.

 

But I wouldn't want to write my datasets to that specific library anyway. If your data are sales data (as the filename suggests), it's much better to store them in a project-specific (sub-)directory. If it's just test data for learning purposes, you can create a directory in any suitable place where you do have access permissions.

 

Let's say you are working on a Windows computer and have created a subfolder sasdata in C:\Users\YourUsername\Documents\.

 

Then you would submit a LIBNAME statement to make this target directory available through a short reference (called libref in the SAS documentation):

 

libname mylib 'C:\Users\YourUsername\Documents\sasdata';

Here, "mylib" (the libref) can be replaced by any valid SAS name (up to 8 characters) you like. Of course, "YourUsername" must be replaced by your Windows user name.

 

After the LIBNAME statement you can write your SAS code with references to the library like in the following example:

data mylib.mysalesdata;
/* ... */
/* your code here */
/* ... */
run;

Submitting this DATA step would then create your permanent dataset: a file C:\Users\YourUsername\Documents\sasdata\mysalesdata.sas7bdat.

 

Good luck!

Solution
‎12-15-2015 11:06 PM
Super User
Posts: 9,681

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

If you are using Univerisity Edition. You can not write sas table into SASUSER.

Show us your code :

 

 

New Contributor
Posts: 4

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

data sasuser.mysalesdata;
set sashelp.prdsale;
if product="SOFA";
run;
Super User
Posts: 17,828

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Assuming your working on one of the SAS training coures, you're using the wrong set of code. Go back to the instructions and find the one for SAS UE.
Super User
Posts: 17,828

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Write to the work library or another library instead of sasuser. Change sasuser to work.

Data work.mysalesdata;
...
New Contributor
Posts: 4

Re: ERROR: Write access to member SASUSER.MYSALESDATA.DATA is denied.

Thank you Got it Smiley Happy
☑ This topic is SOLVED.

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

Discussion stats
  • 8 replies
  • 2315 views
  • 0 likes
  • 5 in conversation