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

I want to run this particular code. 

 

data sasuser.admit2;
set sasuser.admit;
where age>39;
run;
proc print data=sasuser.admit2;
run;

 

The above code didn't actually execute in SAS university edition because the data set sasuser.admit data set is not present in my system.

 

I ran the code given in the following link and executed the same

 

support.sas.com/publishing/cert/sampdata.txt

 

the code got executed, and it created many files in sasuser folder in  '/folders/myfolders/', but i am not able to see any data set in the sasuser library. Its just showing SASUSER which was already there long before i executed the code given in the above link.

 

Among the many files created as a result of executing the above code in the link, a file name admit was also created with .DAT extension . 

 

i tried running the same code again.

 

data sasuser.admit2;
set sasuser.admit;
where age>39;
run;
proc print data=sasuser.admit2;
run;

 

but it will show an error like:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 data sasuser.admit2;
57 set sasuser.admit;
ERROR: File SASUSER.ADMIT.DATA does not exist.
58 where age>39;
59 run;
 
ERROR: Write access to member SASUSER.ADMIT2.DATA is denied.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
60 proc print data=sasuser.admit2;
ERROR: File SASUSER.ADMIT2.DATA does not exist.
61 run;
 
 
Even though files are showing up in  /folders/myfolders/ but the same files are not showing up as data set in the library section of SAS univesity edition, due to which i am not able to execute the above code. Please assist to bring data sets under SASUSER.

SASUSER error1.JPGSASUSER error.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  The bottom line is that you cannot use the default SASUSER library with the program that makes the Prep Guide data -- because, by default, the SAS UE users and SAS OnDemand for Academic users and some EG users do NOT have write access to the default SASUSER location. However, as indicated in this web site (which has an updated version of the Prep Guide program for UE users), you can make the datasets and still use a reference to SASUSER. Please note that you do NOT have to edit the program, but you do have to follow ALL of the instructions you will find here:

http://support.sas.com/publishing/cert/basecertguide3.html

 

  Please play particular attention to step #3, which explains how you "redirect" your default SASUSER library to a new location to which you do have write access. In the #3 step, a suggestion is made that you make a folder called "certprep" and then you can redirect your SASUSER reference using this LIBNAME statement:

libname sasuser "/folders/myfolders/certprep";

  As is says in step #3, you must use the filename of the new directory. In their examples, they use the name certprep. If you use another filename, substitute the name that you created for certprep in the above LIBNAME statement.

 

  Once you follow the instructions as shown on the web site, you only need to follow the link on the above web page to get the program and then run the program.

 

  Because the LIBNAME statement has redirected SASUSER to a different location where you have WRITE access, the programs in the Base and Advanced Prep Guides (which use the same data files) should now work for you.

 

  Hope this helps clarify that you do NOT need to change the program the above web site has the updated program; you do not need to write to training@sas.com as you did in the past because the above web site has the updated program and instructions; and, perhaps you detect the theme of this posting,  the web site above contains the instructions that you need to follow and the program you need to run to work with the Base and Advanced Prep Guides.

 

cynthia

 

 

View solution in original post

9 REPLIES 9
Reeza
Super User

Contact training@sas.com for the code for SAS UE. 

Kurt_Bremser
Super User

- On SAS UE, the SASUSER library is read-only. You can't put anything there. Even if you already had the dataset there, your step would not work.

- to use the files in /folders/myfolder, you need to define a libname for that location:

libname mylib '/folders/myfolder';

You can then use library mylib to reference your practice datasets.

prashant2
Calcite | Level 5

Thank you very much for your response.I did as you said and wrote the following code.

 

libname mylib '/folders/myfolders/mylib1';
data mylib.admit2;
set mylib.admit;
where age<39;
run;
proc print data=mylib.admit2;
run;

 

However, i am still receiving the error in the log window " ERROR: File MYLIB.ADMIT.DATA does not exist."

 

the data set is in the folder mylib1 but it says the data set does not exist, and the current data set 'admit' only have observations, no attributes are assigned to it. What is the way out to access this data set without errors

Kurt_Bremser
Super User

Since you are using SAS UE, take a look at the shared folder with the Windows explorer to determine the path leading to those files.

Then use the internal UNIX equivalent for the libname.

Reeza
Super User

You have to first modify the sample code so the datasets are generated in the correct library. 

 

 

See the discussion here. 

https://communities.sas.com/t5/General-SAS-Programming/SAS-Certification-program-problem/m-p/188775#...

Cynthia_sas
SAS Super FREQ

Hi:

  The bottom line is that you cannot use the default SASUSER library with the program that makes the Prep Guide data -- because, by default, the SAS UE users and SAS OnDemand for Academic users and some EG users do NOT have write access to the default SASUSER location. However, as indicated in this web site (which has an updated version of the Prep Guide program for UE users), you can make the datasets and still use a reference to SASUSER. Please note that you do NOT have to edit the program, but you do have to follow ALL of the instructions you will find here:

http://support.sas.com/publishing/cert/basecertguide3.html

 

  Please play particular attention to step #3, which explains how you "redirect" your default SASUSER library to a new location to which you do have write access. In the #3 step, a suggestion is made that you make a folder called "certprep" and then you can redirect your SASUSER reference using this LIBNAME statement:

libname sasuser "/folders/myfolders/certprep";

  As is says in step #3, you must use the filename of the new directory. In their examples, they use the name certprep. If you use another filename, substitute the name that you created for certprep in the above LIBNAME statement.

 

  Once you follow the instructions as shown on the web site, you only need to follow the link on the above web page to get the program and then run the program.

 

  Because the LIBNAME statement has redirected SASUSER to a different location where you have WRITE access, the programs in the Base and Advanced Prep Guides (which use the same data files) should now work for you.

 

  Hope this helps clarify that you do NOT need to change the program the above web site has the updated program; you do not need to write to training@sas.com as you did in the past because the above web site has the updated program and instructions; and, perhaps you detect the theme of this posting,  the web site above contains the instructions that you need to follow and the program you need to run to work with the Base and Advanced Prep Guides.

 

cynthia

 

 

thenewlearner
Calcite | Level 5

I have a similar error when trying to do the base cert prep guide practice using UE. followed the above instructions, Now I've setup the data without errors (not sure if the entire practice set is actually successfully setup though.), created a new folder "certprep" under "myfolder" and re-directed the library to certprep (libname sasuser "/folders/myfolders/certprep";). but when trying the first practice in chapter 2 i'm still getting the error saying the "Mylib does not exist". Not sure what went wrong and how to fix. this is the log:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62
63
64
65 libname MYLIB 'SAS-data-library';
NOTE: Libref MYLIB refers to the same physical library as CERTPREP.
WARNING: Library MYLIB does not exist.
NOTE: Libref MYLIB was successfully assigned as follows:
Engine: V9
Physical Name: /opt/sasinside/SASConfig/Lev1/SASApp/SAS-data-library
66 data MYLIB.admit;
67 set sasuser.admit;
68 if ActLevel="HIGH";
69 run;

ERROR: Library MYLIB does not exist.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds


70 proc print data=mylib.admit;
ERROR: File MYLIB.ADMIT.DATA does not exist.
71 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

72
73 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
86

Reeza
Super User

Libname statement doesn't have a path listed....

 

 

thenewlearner
Calcite | Level 5

oh, newbie mistake LOL.

 

Thanks Reeza.

Welcome to the Certification Community

 

This is a knowledge-sharing community for SAS Certified Professionals and anyone who wants to learn more about becoming SAS Certified. Ask questions and get answers fast. Share with others who are interested in certification and who are studying for certifications.To get the most from your community experience, use these getting-started resources:

Community Do's and Don'ts
How to add SAS syntax to your post
How to get fast, helpful answers
3 ways to show off your SAS skills

 

Why Get SAS Certified.jpg

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
  • 9 replies
  • 11506 views
  • 5 likes
  • 5 in conversation