Hi,
It is a very common error, whenever we try to assign a libref to the LIBNAME function.
Suppose we try to run the following code in windows environment :
Libname January "C:\Users\Uma\Desktop\blog data\1.txt";
and then we would get the following error in SAS log :
ERROR: Library JANUARY is not in a valid format for access method RANDOM.
ERROR: Error in the LIBNAME statement.
I am not going to deal with the more technical stuff for this.
Just try to understand the basic job of LIBNAME statement. It's primary functionality is to refer a library or physical location. We can call it here as folder.
So on the above example, we have given path for the specific file not for folder.
Remember, whenever you are going to use LIBNAME just give the folder path ( Window environment) not path of any specific file.
In short : Libname is to refer the folder not file (Windows environment)
Here we go with correct one :
Libname January "C:\Users\Uma\Desktop\blog data";
It is a very common error, whenever we try to assign a libref to the LIBNAME function.
Suppose we try to run the following code in windows environment :
Libname January "C:\Users\Uma\Desktop\blog data\1.txt";
and then we would get the following error in SAS log :
ERROR: Library JANUARY is not in a valid format for access method RANDOM.
ERROR: Error in the LIBNAME statement.
I am not going to deal with the more technical stuff for this.
Just try to understand the basic job of LIBNAME statement. It's primary functionality is to refer a library or physical location. We can call it here as folder.
So on the above example, we have given path for the specific file not for folder.
Remember, whenever you are going to use LIBNAME just give the folder path ( Window environment) not path of any specific file.
In short : Libname is to refer the folder not file (Windows environment)
Here we go with correct one :
Libname January "C:\Users\Uma\Desktop\blog data";
I like the helpful information you provide in your articles.
ReplyDeleteI'll bookmark your weblog and check again here frequently.
I am quite certain I will learn plenty of new stuff right
here! Best of luck for the next!
I'm gone to convey my little brother, that he should
ReplyDeletealso go to see this website on regular basis to take updated from most up-to-date news.
I pay a visit day-to-day a few web pages and information sites to read articles, however
ReplyDeletethis blog gives feature based articles.
Hello to all, it's really a pleasant for me to pay a
ReplyDeletequick visit this website, it includes valuable Information.
Great item, great price, thanks again, A+++
ReplyDeleteIt's going to be end of mine day, except before ending I am reading this impressive article to increase my knowledge.
ReplyDeleteThe Birch of the Shadow
ReplyDeleteI think there may perhaps be a several duplicates, but an exceedingly handy listing! I've tweeted this. Many thanks for sharing!