I'm taking a college level SAS course atm. From what I have learnt, libref is a name in which you associate the physical location of a group of files to SAS.
The libname statement creates a library reference (libref) for a SAS program.
In general, the basic syntax of libname is:
libname libref 'path';
For example:
libname sales 'C:\salesdata\journal\june';
In other words, for SAS to be able to read and write data from a dataset, it must know the directory or folders that contains the particular dataset. SAS calls what we humans call directory or folders as "libraries". SAS also assigns nicknames (libref) to these libraries and use the libname statement to assign the nickname to a specific folder.
For example if you want to print an existing SAS dataset located inside the "june" folder, you can do this:
libname sales 'C:\salesdata\journal\june';
proc print data = sales.revenue;
run;
SAS will print the data portion of the "revenue" dataset that is located inside the "june" folder because we have assigned sales to that folder. Hope this helps.