BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Tracy29
Calcite | Level 5

When I run SAS macro code, I get the error "Data set WORK.TAJ is already open for output." 

Why that could happen?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

@Tracy29 wrote:

When I run SAS macro code, I get the error "Data set WORK.TAJ is already open for output." 

Why is that could happen?


No idea. Posting the ERROR on its own without the code that caused it tells us exactly nothing.

Please post the code you ran successfully before you tried to make it dynamic with a macro. If you do not have such code, you violated rule #1 of macro development: start with working non-macro code.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

@Tracy29 wrote:

When I run SAS macro code, I get the error "Data set WORK.TAJ is already open for output." 

Why is that could happen?


No idea. Posting the ERROR on its own without the code that caused it tells us exactly nothing.

Please post the code you ran successfully before you tried to make it dynamic with a macro. If you do not have such code, you violated rule #1 of macro development: start with working non-macro code.

Reeza
Super User

Do you have the TAJ table open and viewed?

Usually that's why. Ensure the table is closed before running the macro again. 

 

 

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!

Discussion stats
  • 2 replies
  • 1474 views
  • 0 likes
  • 3 in conversation