I was running SAS on windows pc and now want to run it under Unix.
I copied files from windows PC to the Unix machine. I got a number of errors/
1.When I started SAS, I got:
ERROR: Expecting page 1, got page -1 instead.
ERROR: Page validation error while reading SASUSER.PROFILE.CATALOG.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
2. When I tried to run sas as "sas test.sas", I got:
ERROR: File is locked, but no other information is available. File =/HPCTMP_NOBKUP/test_04052016/test.log. System Error Code = 38.
3. When I tried to open the test.sas file in the editor window, I got:
ERROR: File is locked, but no other information is available. File =/HPCTMP_NOBKUP/test_04052016/test.sas. System Error Code = 38.
ERROR: File is in use, /HPCTMP_NOBKUP/test_04052016/test.sas.
4. I tried copy and paste the code into the editor window, instead of trying to open the test.sas file, I still got the locked error.
This is my first time running sas on Unix, maybe I missed something in configuration?
Thanks
Thanks all replies.
Someone from the high performace computing facility told me to run sas as:
$sas -filelocks none
and it solved all problem. I still do not quite get it, but this is the solution.
Sorry, you "copied files from PC"? In what way? I would imagine that Unix SAS has its own installer and such like, it would certainly need different configuration to get running as paths and such like are different and catalogs will be different. What "SAS" are you using, is it a 9.x release, SAS Univeristy Edition, EG etc. Who brought the license, your IT group - they would be best placed to install and set it up. The first error there could well be it trying to open a Windows style file on Unix.
The unix sas is also 9.4, installed on a high performance computing facility in the school.
I was using windows version SAS 9.4 on my desktop pc (win 7).
I transferred the data and sas files, and edited the libnames in the sas files to update the folder paths in the unix system.
I guess I need to use "-flielocks continue" somewhere, but not sure
Looks like you tried to copy your SASUSER.PROFILE catalog from your PC to Unix. Don't do that. Just delete the catalogs in your SASUSER library and SAS will create new valid ones the first time you start it.
In fact you cannot directly copy any catalog (*.sas7bcat) files between different versions of SAS. You CAN copy the SAS datasets (*.sas7bdat) but you might need to convert them to get the best performance.
If you want to transfer catalogs (like format catalogs) then you can use PROC CPORT to export on the old machine and PROC CIMPORT to import on the new machine.
For format catalogs you can also use PROC FORMAT to create a SAS dataset with the format definition. You can then copy the dataset and use PROC FORMAT to use it to create a new format catalog. Or you just re-run the SAS program that created the format catalog on the new machine.
How do you log on to the UNIX system?
Once you are logged on, change to the directory where your .sas file is located and do a ls -l filename
If the file exists and should be accessible to you (check user/group and permissions), try vi filename
(as the text editor vi exists on all UNIX systems)
If you still get messages indicating the file is locked, try fuser filename
This is a command that shows process numbers that have an open filehandle on filename
Thanks all replies.
Someone from the high performace computing facility told me to run sas as:
$sas -filelocks none
and it solved all problem. I still do not quite get it, but this is the solution.
Thank you, Kurt
I am the only person using the file. Not sure why I got the error.
SAS -filelocks continue did not solve the problem, but sas -filelocks none did.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.