BookmarkSubscribeRSS Feed
Aditi24
Obsidian | Level 7

Hi I am running a batch to the unix server which on execution forms a log file. When I try to re-run the same batch file, I get below error in the log file. 


File is locked, but no other information is available. File =/opt/test/sas_programs/pgm/check.sas. 
System Error Code = 13.

Please help to get this problem resolved.

3 REPLIES 3
LinusH
Tourmaline | Level 20

Batch, how exactly are you executing the program?

Are you 100% sure that the previous execution has finished?

What does your program do?

Data never sleeps
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I owuld imagine something in your code is either a) not closing and open file ref ref, or b) isn't set to overwrite an existing file.  However with no knowledge of the code being run, or the underlying system its hard to say.  Check your code, things like libname excel, need to be closed otherwise the file handle is still open.  If that is definately all closed, then check out the process with your IT team.

Kurt_Bremser
Super User

Have the system administrator check which process/user locks the file (with the UNIX fuser command).

You might even be able to do this yourself, if you can ssh to the server.

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
  • 3 replies
  • 1775 views
  • 0 likes
  • 4 in conversation