running the same macro twice with different arguments and when sas starts executing the second macro i am getting this below:
ERROR: You cannot open WORK.xxx.DATA for output access with member-level control because WORK.xxx.DATA is in use by you
in resource environment Program temp1.sas.
any idea what might be causing this guys?
hi
can you give us the code?
It sounds like your macro opens the data set, but then fails to close it once it is no longer needed. So the second run tries to open a data set that is already open.
You'll have to inspect the macro to see where this happens, and add the closing logic at the right spot.
Good luck.
Are you using SAS EG by any chance? If so then make sure that under "Options/Results General" you untick box "Automatically open data or results when generated".
What could happen: Your macro wants to create/write to the same table twice but the table gets opened (and locked) after the first time you touch it.
I also would untick "Options/Data General/Automatically open data when added to project"
And under "Options/SAS Programs" have a tick in "close all open data before running code"
yes it is EG and i changed the settings as per your instructions but still same errors. I also checked with other co-workers.They have the same options checked and they can run the code with no errors. It is exactly the same code. When i run the macro separately it works just fine
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.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.