BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Lalit_verma
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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

Show us your code :

 

 

View solution in original post

8 REPLIES 8
LinusH
Tourmaline | Level 20

Do you get this independent of data set?

Perhaps the -RSASUSER option i set.

Data never sleeps
Lalit_verma
Calcite | Level 5
This was my first code..:( And i am stuck at the first step
FreelanceReinh
Jade | Level 19

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!

Ksharp
Super User

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

Show us your code :

 

 

Lalit_verma
Calcite | Level 5
data sasuser.mysalesdata;
set sashelp.prdsale;
if product="SOFA";
run;
Reeza
Super User
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.
Reeza
Super User
Write to the work library or another library instead of sasuser. Change sasuser to work.

Data work.mysalesdata;
...
Lalit_verma
Calcite | Level 5
Thank you Got it 🙂

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 8 replies
  • 14692 views
  • 1 like
  • 5 in conversation