BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NKormanik
Barite | Level 11

Curious if it's good practice to give some command for SAS to recover (reset, stabilize, recoup) following an involved proc statement.

 

In other words, suppose some proc statement execution takes 10 minutes to complete.

 

Before issuing another proc statement (via batch set of commands) is there a way to tell SAS to take a break -- relax, regain all your memory parts, clean up your temp files, recover -- prior to moving on to the next proc statement.

 

If so, what is that "take-a-break" command?

 

Any thoughts appreciated.

 

Thanks,

Nicholas Kormanik

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

When a step finishes, all the resources it used internally are cleaned up. Libnames or file references that you defined before the step will still be active, and some things created by a step (e.g. macro variables through CALL SYMPUT, or file references through the FILENAME function) also.

I have no in-depth knowledge if SAS keeps file data in buffers after use (e.g. a dataset created by the step) for the purpose of fast access if the dataset is used again immediately; if it does, this might explain a larger RAM footprint after execution of a step.

 

Bottom line: there is no need for such housekeeping, if you suspect a "memory leak", bring it to the attention of SAS technical support.

View solution in original post

5 REPLIES 5
Kurt_Bremser
Super User

When a step finishes, all the resources it used internally are cleaned up. Libnames or file references that you defined before the step will still be active, and some things created by a step (e.g. macro variables through CALL SYMPUT, or file references through the FILENAME function) also.

I have no in-depth knowledge if SAS keeps file data in buffers after use (e.g. a dataset created by the step) for the purpose of fast access if the dataset is used again immediately; if it does, this might explain a larger RAM footprint after execution of a step.

 

Bottom line: there is no need for such housekeeping, if you suspect a "memory leak", bring it to the attention of SAS technical support.

NKormanik
Barite | Level 11
Good to know, Kurt. Thanks so much for your thorough, well-informed reply. As well as being so fast to respond.
ballardw
Super User

@NKormanik wrote:
Good to know, Kurt. Thanks so much for your thorough, well-informed reply. As well as being so fast to respond.

Some minor things to consider cleaning up/resetting:

Title/Footnote statements since these persist.

System or graphic options that may be needed temporarily such as page orientation, missing character option, graph area size settings.

Not so much for resources as to ensure that output created is as expected.

Astounding
PROC Star

@Kurt_Bremser is right about that.  However, there is one additional resource you may want to consider:  cleaning up the WORK space.

 

If your long-running program creates temporary data sets in the WORK library, it would be possible to run out of WORK space.  You can remove temporary data sets that are no longer needed by using PROC DATASETS or PROC DELETE.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 496 views
  • 0 likes
  • 4 in conversation