BookmarkSubscribeRSS Feed
CurtisSmithDCAA
Obsidian | Level 7

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?

 

6 REPLIES 6
ballardw
Super User

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?

CurtisSmithDCAA
Obsidian | Level 7

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.

Reeza
Super User

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. 

ballardw
Super User

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.

CurtisSmithDCAA
Obsidian | Level 7

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 968 views
  • 0 likes
  • 3 in conversation