BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fengyuwuzu
Pyrite | Level 9

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

1 ACCEPTED SOLUTION

Accepted Solutions
fengyuwuzu
Pyrite | Level 9

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.

View solution in original post

7 REPLIES 7
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

fengyuwuzu
Pyrite | Level 9

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

Tom
Super User Tom
Super User

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.

fengyuwuzu
Pyrite | Level 9
I deleted the profile.sas7bcat and regatry.sas7bitm in the sasuser.v94 directory, and started sas again.

Then in sas I created a small program and tried to save it, still got the lock error.

Then I used vi to create a small sas file, just read in 2 data lines, and saved as .sas file. I tried to open it in SAS, but got the locked error again. This .sas file is a fresh one created in Unix, not a windows version.

I also tried to start SAS as "$ sas -filelocks continue" but it does not make difference
Kurt_Bremser
Super User

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

 

fengyuwuzu
Pyrite | Level 9

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.

fengyuwuzu
Pyrite | Level 9

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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 3037 views
  • 0 likes
  • 4 in conversation