BookmarkSubscribeRSS Feed
anoopm7
Calcite | Level 5

All, My SAS admin team have upgraded the SAS version from 9.1 to 9.2 two days back. We have modified our scripts to read the same in our Unix box.

One thing I noticed that there were lot of Jobs going down after the upgradtion saying the 'LOG' file is in use. We have a setup of Jobs in which a common log location is used by multiple Jobs to  update the logs same time. This has been the procedure for a long time (I would say years) and there hasn't been any problem. I am not sure what has the SAS 9.2 to play in this error. Is it SAS 9.2 doesn't have the capability to support multiple files been written to a same location. (The strange part is that few other Jobs which do the same is running good ).

Any thoughts on this. Thanks in advance,

ERROR:

ERROR : File in use, /home/cchome01/abcd12/logs

Thanks

AM

5 REPLIES 5
SASKiwi
PROC Star

My guess is you are running your SAS jobs in batch mode - correct? If so the LOG file produced by a SAS program will be the same name as the program file. For example if your SAS program is called MYSASPROG.SAS then your log will be called MYSASPROG.LOG by default. That means if you run the same program more than once at the same time you will get the LOG file in use error as you describe.

Your SAS 9.1 must have been doing something different to your SAS 9.2 to avoid this happening, like running your 9.1 jobs sequentially only.

anoopm7
Calcite | Level 5

Thanks SASKiwi, These SAS Jobs are submitted in batch mode. The beautifull part is at times it runs good and at times it fails. How do I find that the SAS 9.2 would be submitting the Jobsin batch and SAS 9.1 in Sequential.

kjorgens
Fluorite | Level 6

We ran into that exact same thing -- we are using the share server.  Are you?

If so, this is what I remember:

We run a program using the share server, which updates a dataset (that we view using FSView.)

When we switched over, we got a "File is in use" error.  It would no longer allow us to "share" writing to the log file.

What we did to work around this was create a log file for each $USER.

So in the unix script that runs the program that updates the shared file, you might do something like this:

/* get unix username from person logged in */

LOGNAME=$USER

/* execute sas program and write to the user log file */

sas /<filepath for program>/program.sas -log /<path where .log files should be written>/reqedit_$USER.log

Hope this helps.

Kathy Jorgensen

kjorgens
Fluorite | Level 6

Whoops -- sorry for the typo -- "reqedit" should be program_&USER.log in the example I gave.

(reqedit is the name of the program we use Smiley Wink )

/* get unix username from person logged in */

LOGNAME=$USER

/* execute sas program and write to the user log file */

sas /<filepath for program>/program.sas -log /<path where .log files should be written>/program_$USER.log

kjorgens
Fluorite | Level 6

One more thing -- SAS Support thought it might be related to a FILELOCKS=FAIL setting.

But thatsetting was the same for us in SAS 9.1.3 and SAS 9.2, so that was not a solution for us.

We just decided to live with the workaround.

-- Kathy J.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2312 views
  • 8 likes
  • 3 in conversation