DATA Step, Macro, Functions and more

Unable to open a SAS dataset from a library

Reply
Frequent Contributor
Posts: 147

Unable to open a SAS dataset from a library

Hi All,

 

Can some one help me below issue.

 

I am able to open all data sets except for two data sets in my library. All are upcased dataset names and cannot be changed. Any thoughts on how to open dataset in library. I am able open the datasets in the location but not using libname.

 

 

Contributor
Posts: 35

Re: Unable to open a SAS dataset from a library

Posted in reply to rakeshvvv

A couple of thoughts. 

 

How long are the dataset names?  If they are too long (>32 characters) then I don't think the explorer can show them.

 

Are the datasets from a different operating system than you are currently working on?  When I get transferred data sometimes it is created in PC SAS where I am using Linux SAS.  I have to go into PC SAS to convert the dataset to a transport file and then unzip it within Linux SAS to be able to see it in my explorer and use it.

 

Trusted Advisor
Posts: 1,849

Re: Unable to open a SAS dataset from a library

Posted in reply to rakeshvvv

Are you sure that the two datasets are sas datasets? 

Do you get any message in the log ? maybe they are damaged?

 

run next code and post the log;

     data test;  set <lib.dsname>; run;

Frequent Contributor
Posts: 147

Re: Unable to open a SAS dataset from a library

Please find the below log.

 

GOPTIONS ACCESSIBLE;
26 data x;
27 set old.MRI_JUL30;
ERROR: File OLD.MRI_JUL30.DATA does not exist.
28 run;

Super User
Posts: 13,950

Re: Unable to open a SAS dataset from a library

Posted in reply to rakeshvvv

Can you see OLD.MRI_JUL30.DATA in the SAS explorer data set list? If so and you click on it what happens?

 

Lower case L   l
may look a lot like upper case "i" in some fonts
Super User
Posts: 10,623

Re: Unable to open a SAS dataset from a library

Posted in reply to rakeshvvv

@rakeshvvv wrote:

Please find the below log.

 

GOPTIONS ACCESSIBLE;
26 data x;
27 set old.MRI_JUL30;
ERROR: File OLD.MRI_JUL30.DATA does not exist.
28 run;


This means that no file

mri_jul30.sas7bdat

exists in the directory to which the libname for library OLD points.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 10,623

Re: Unable to open a SAS dataset from a library

Posted in reply to rakeshvvv

Please show the logs of successes and failures. And make sure that the names of the files are all lowercase if you're working on UNIX.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
PROC Star
Posts: 635

Re: Unable to open a SAS dataset from a library

[ Edited ]
Posted in reply to rakeshvvv
PROC SQL;
select distinct memname 
from dictionary.tables 
where libname="<Your Library Name in UPCASE>"
;
quit;

Run this query and check if the tables exists or not, if they exist then @ballardw might be right.

Thanks,
Suryakiran
Ask a Question
Discussion stats
  • 7 replies
  • 147 views
  • 0 likes
  • 6 in conversation