DATA Step, Macro, Functions and more

Problems with WORK.SASMACR.CATALOG

Reply
Contributor
Posts: 30

Problems with WORK.SASMACR.CATALOG

Dear all,

since a couple of days we are facing some autoexec-issues: we %include the source code for our macros in the appserver_autoexec.sas which was very fine until recently.
Now we get the below error message more and more often and we have no idea what could be the reason...of course the problem here is that then our batch-job will fail to run.
Here's the log-excerpt (we are using SAS 9.1.3. SP4 on Windows Server 2003):
ERROR: A lock is not available for WORK.SASMACR.CATALOG, lock held by another process.
ERROR: A dummy macro will be compiled.


Any input would be highly appreciated,
br Thomas
Super Contributor
Posts: 474

Re: Problems with WORK.SASMACR.CATALOG

Hmmm.

Has any macro included from appserver_autoexec.sas been changed lately?

Could be a macro that has some compiling issues...

Cheers from Portugal.

Daniel Santos @ www.cgd.pt.
Contributor
Posts: 30

Re: Problems with WORK.SASMACR.CATALOG

No that can't be the reason because most of the times it still works but only sometimes crashes. Unfortunately the error is not reproducible.

Thanks for the idea Smiley Happy

br Thomas
Super Contributor
Posts: 474

Re: Problems with WORK.SASMACR.CATALOG

OK then.

It could be a misuse of some macro. Say some "weird" parameter value passed to the macro that is messing with the macro code. Not easy to diagnose.

One thing is sure, If everything was alright a couple of days before, something changed and provoked this behavior. I suggest you start from there, and try to identify what scripts have been modified recently.

Best of luck.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt.
Super User
Posts: 10,500

Re: Problems with WORK.SASMACR.CATALOG

This looks like multiple sessions of SAS are trying to access the same physical WORK library. If you test your batch job with an interactive session running I would expect this error.
Contributor
Posts: 30

Re: Problems with WORK.SASMACR.CATALOG

We are indeed using SAS/Connect sometimes to change the user during code execution. The strange thing is that it works most of the times, then it fails with the mentioned error.

I'll try to add some code to the autoexec.sas which checks for (compiled) macros and that deletes them.

br Thomas
Valued Guide
Posts: 2,175

Re: Problems with WORK.SASMACR.CATALOG

for another approach:
as you use %include of common code, I assume you normally include the same collection of macros. Have you tried pre-compiling the macros with the mSTORED option?
It should be straight forward to prepare the catalog and move into the server on a one-off basis. In the server, place it somewhere that can be addressed by your users on a read-only basis. That should stop the contention lock.

just my $0.02
PeterC
Super Contributor
Posts: 474

Re: Problems with WORK.SASMACR.CATALOG

Hmmm. Strange.

For every session SAS creates/allocates a newly WORK lib with a randomly choosen directory name under the global WORK path (check fort hte -WORK option in your CFG file for the global WORK path). So it is virtually impossible to have two sessions sharing the same physical WORK lib.

I would bet in some missing %mend or quote, or parameter misuse that is messing with the macro compiler and locking the catalog.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt.
Contributor lu
Contributor
Posts: 23

Re:Problems with WORK.SASMACR.CATALOG

Hi

very high find this's 'fantom' bug. I think you need
exclude WORK (-work option from config file) folder and it's subfolder from antivirus checking on your machine

some antivirusis lock new created files for virus scan.

lu
Ask a Question
Discussion stats
  • 8 replies
  • 1488 views
  • 0 likes
  • 5 in conversation