- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
libname statdata "/folders/myfolders/ECST131";
libname library "/folders/myfolders/ECST131";
after this folder successfully assigned.
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
kindly help me to shootout this error
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
testscores.sas7bdat. file does not exist in my PC anywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
does testscores exist on your PC in some other format? And if yes, what format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.