DATA Step, Macro, Functions and more

SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Reply
Occasional Contributor
Posts: 19

SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

I have an application that reads any size SAS data set, does some rearranging and computations, and then creates several graphs and plots. When I specify a by variable, my app creates a separate graph or plot for each by variable. I recently upgraded to 9.4 TS1M3. I don’t know if this is a factor in my problem.

 

My app works very well. But, if I run the app multiple times using a different by variable each time, after 2 or 3 successful runs, SAS will crash without telling me why. After restarting SAS and resuming my runs where SAS crashed, the app will successfully run against the by variable where SAS previously crashed. After 2 or 3 more successful runs, SAS will crash again. So, the problem does not seem to be connected to the data or the by variable; rather it seems to be tied to the number of times I run the app in the same SAS session. So, I am figuring that this is a resource issue. I have enough hard drive space. And, at the end of each run my app clears the WORK library. Any ideas?

 

Super User
Posts: 11,343

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Posted in reply to CurtisSmithDCAA

Does your App involve SAS macro code? You may have to share that to have a chance of solving the issue or even identifying where to look.

Do you clean up any temporary data sets before or after use?

Do any of your "by" variables have missing values? Was the app set up to handle missing by levels?

 

Is any of the data involved on a network or server that may have response issues?

 

Do you get any log results at all? Do you have a screen capture of any "crash" related information?

Occasional Contributor
Posts: 19

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Yes, marco code is used extensively.

 

By variables may having missing values, and I think that I have written the code to expect that possibility. But, given that the app will run for a crashed by group after restarting, I don't think missing values are the problem.

 

I do clean out temporary SAS data sets.

 

All data is local.

 

When my app starts I direct the log to an external file. I do get a log up to the point of the crash, but there is nothing in the log to indicate the reason for the crash, the log just stops.

 

There is no crash related info on the screen. It is just a Windows dialog that the SAS application crashed.

Super User
Posts: 19,868

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Posted in reply to CurtisSmithDCAA

Does SAS crash or does a pop up appear saying it's crashed and close the application?

 

I get that sometimes, but it actually doesn't crash, I wait a bit and then close it and keep working. 

Super User
Posts: 11,343

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Posted in reply to CurtisSmithDCAA

I would suggest turning on the macro debugging options MPRINT SYMBOLGEN and MLOGIC if you haven't already. You may get more log output than is fun to read but you'll also get the log of procs or data steps inside macros that you don't currently.

 

If this process involves one or two large macros, especially involving nested calls macro calls, it may be worth looking at breaking things up into data preparation and data display. That way if the data prep completed you should have the data (may want to work with data in a permanent library if you aren't already) and know that isn't where thing failed. Then attempt the display part - without macros first- on that data to see more of the behavior. If the data did not complete then that tells you something else.

 

The symptom makes me think some part of the macro gets out of bounds, an unclosed block or statement or create something with a call that is so far from expected that the SAS compiler doesn't quite catch an error until it tries to create a graph of -10 inch wide display or similar.

Super User
Posts: 19,868

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

Posted in reply to CurtisSmithDCAA

What do you mean by 'app'?

Occasional Contributor
Posts: 19

Re: SAS 9.4 TS1M3 Crashes on Multiple Runs of My Graphing App

My SAS program, bundled within a macro. I guess I'm letting the younger generation slang affect me.

Ask a Question
Discussion stats
  • 6 replies
  • 107 views
  • 0 likes
  • 3 in conversation