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

Doing a series of Proc Logistics on multiple datasets (finally!).

 

SAS seems to have frozen after getting through around 7 datasets (of 59 total).

 

Trying everything I can think of to take a pulse to see if SAS is still alive.

 

Resource Monitor shows it's running, 31 threads, 6.24% of CPU.

 

Analyze Wait Chain says "One or more threads of sas.exe are waiting to finish network I/O."  On a stand-alone machine?

 

Is there a better way to ascertain whether the patient is alive or dead?

 

Is it a good idea, or even possible, to 'flush' between iterations?  In other words, before allowing SAS to proceed onto the next dataset, should I insist it visit the Ladies Room?  How exactly do I do that? 

 

Thanks!

 

Nicholas Kormanik

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Some tricks I do when setting up long-running jobs:

  • redirect SAS log to known location, and periodically check that log info is being updated. On UNIX I use "tail -50 logs/file.log". On Windows I use Notepad++ which doesn't demand an exclusive lock.
  • If the job will create lots of transient data sets that aren't needed for the entire process, use PROC DELETE or PROC DATASETS to delete these between steps.
  • Redirect the WORK option to a folder that has lots of space in case some tasks (SORT or SQL) will generate large utility files. Mostly applies to UNIX where quotas can differ based on space.

For a Windows job already in motion where you haven't done these steps, use a tool like Process Explorer to monitor the open file handles to find signs of life.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

Some tricks I do when setting up long-running jobs:

  • redirect SAS log to known location, and periodically check that log info is being updated. On UNIX I use "tail -50 logs/file.log". On Windows I use Notepad++ which doesn't demand an exclusive lock.
  • If the job will create lots of transient data sets that aren't needed for the entire process, use PROC DELETE or PROC DATASETS to delete these between steps.
  • Redirect the WORK option to a folder that has lots of space in case some tasks (SORT or SQL) will generate large utility files. Mostly applies to UNIX where quotas can differ based on space.

For a Windows job already in motion where you haven't done these steps, use a tool like Process Explorer to monitor the open file handles to find signs of life.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
ballardw
Super User

And maybe send all output to an ODS file destination instead of the default HTML results window. Depending on procedure and output it can take more time to make the "results" output display than to run the analysis.

SASKiwi
PROC Star

If any SAS programs are running slowly then look through your SAS log. If Real Time taken for any step is a lot higher than the CPU Time then you can be pretty much guaranteed that your bottleneck is IO.

 

I'm assuming SAS is running your PC as you are looking at MS Task Manager. So where are you reading your data from and writing to? If you are using remote drives or file servers for your data these can be really slow. If all of your data is on local drives then you'll be limited by their bandwidth. How old is your PC? Solid State drives are way faster than traditional disk drives. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1407 views
  • 5 likes
  • 5 in conversation