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";

