DATA Step, Macro, Functions and more

Having problems with dropping tables after multiple iterations of a do loop

Reply
Frequent Contributor
Posts: 82

Having problems with dropping tables after multiple iterations of a do loop

   This is a question that I probably cant get answered, but I am running a complicated algorithim with multiple do loops, that we are trying to make run over and over, dozens to hundreds of times with a macro. Anyways, part of this includes reading in matrixes with IML. We have noticed that after a certain number of times, about 10-15 iterations, some of the IML input datasets seem to get stuck and wont get saved over any more. My plan was to include a sql drop table statement at the end of the loop so it runs after each iteration ends, but the problem still persists. Basically it tells us the table cant be opened because another copy is open for output/update.

Basically, we have no idea why since it works perfectly for a while, after many iterations and rerunning of the macro, and then all of a sudden wont work. Is there a way to do a more forceful drop that will ignore such a warning and force any copies to be closed.

Ask a Question
Discussion stats
  • 0 replies
  • 116 views
  • 0 likes
  • 1 in conversation