This usually occurs because you have a typo in the name for the SAS-data-Library. SAS data libraries are fine on shared drives. If you can see the library with the "My Computer" tool, SAS can see it with the LIBNAME.
And what happens when you take the libname path information and paste it back into a suitable location to view the file drive/directory? If you are able to interchange the path information and still get a SAS error, I recommend you open a SAS support tracking issue.
if through enterprise guide(for example) your libname statement is running on a server, it is possible that the drive O: has a different meaning in that SAS environment, from its meaning in your client session.
That problem can be circumvented by investigating the server drive mappings, or using a UNC path in the libname statement.
How can my pc environment is setup automatically once I start SAS application? Currently, I have to copy/paste the statements like libname mylib 'c:sasdata'; or option OPTIONS FMTSEARCH=(mylib); to my working editor screen every time when I start SAS.
I agree with Scott on the postings, but you are a newbee, so the answer is to use the autoexec.sas file for your things that you want to do at startup. Check out your OS companion document for Windows specific features and otherwise search for autoexec in the SAS documentation.