BookmarkSubscribeRSS Feed
BalachandarB
Calcite | Level 5
libname statdata "/folders/myfolders/ECST131"; 
libname library "/folders/myfolders/ECST131";

after this folder successfully assigned.
NOTE: Libref STATDATA refers to the same physical library as LIBRARY.
NOTE: Libref STATDATA was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/ECST131
63 libname library "/folders/myfolders/ECST131";
NOTE: Libref LIBRARY refers to the same physical library as STATDATA.
NOTE: Libref LIBRARY was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/ECST131

 

but after running following code

proc print data=statdata.testscores (obs=10);
title 'Listing of the SAT Data Set';
run;
title;

Am recieving a error message as follow
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 proc print data=statdata.testscores (obs=10);
ERROR: File STATDATA.TESTSCORES.DATA does not exist.
63 title 'Listing of the SAT Data Set';
64 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
 kindly help me to shootout this error

 

9 REPLIES 9
PeterClemmensen
Tourmaline | Level 20

Why do you define the same library to two different libnames?

 

As the log says.. the testscores data set is not in the statdata library. So go to the statdata library and see if the data set is actually called what you think it is. If SAS says that a data set is not there, it is not there 🙂

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Firstly, don't write/code all in mixed case, upper etc.  It makes a post so hard to read.

Secondly it is really not a good idea to use SAS reserved words as names, in this case library.

Now onto your problem, the erro is telling you that in the library statdata, which references the physical location on the hard drive of /folders/myfolders/ecst131, there isn't a file testscores.sas7bdat.

To solve this, either point to the correct location, or put the file in that location.

BalachandarB
Calcite | Level 5

testscores.sas7bdat. file does not exist in my PC anywhere.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

So what is the problem then?  That files doesn't exist, so you can't write a datastep for it?  Are you following some learning materials maybe, and they say to type in that code?  Maybe before that there is a step which creates the dataset, so you would have to run that to have data available for this step.  Its very hard to try to guess what you are doing, post some information on what you are doing.

PeterClemmensen
Tourmaline | Level 20

does testscores exist on your PC in some other format? And if yes, what format?

Kurt_Bremser
Super User

@BalachandarB wrote:

testscores.sas7bdat. file does not exist in my PC anywhere.


Then why are you expecting it to be there? You obviously skipped the necessary steps to create/import it.

Kurt_Bremser
Super User

Since this is happening in the shared folder of SAS UE, you can use Windows Explorer to navigate to the shared folder and see if subfolder ECST131 contains a file named testscores.sas7bdat. Note that the filename must be all lowercase.

DanLees
Fluorite | Level 6

Looks like you're running the Statistics 1 demo, right?

 

Somewhere you'll either be provided with the data to download/obtain somehow, or in a code example you'll be creating this table.

 

You're assigning the correct library based on the code snippet, you just haven't actually created your data yet.

 

Also, get rid of the 'libname library' statement, it's a duplicate of the STATDATA libref.

Tom
Super User Tom
Super User

Just a quick note for all of the posters that are commenting on the fact the the original code created two librefs pointing to the same location.  The default FMTSEARCH settings for SAS will look for a catalog named LIBRARY.FORMATS to find user defined formats.  So it is/was standard coding practice to create a libref named LIBRARY that pointer to your project folder to find your project specific format catalog.

 

One way to do this that does not require creating the LIBRARY libref is to instead use the FTMSEARCH option to tell SAS to look for formats in the STATDATA.FORMATS catalog instead.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 2212 views
  • 2 likes
  • 6 in conversation