Tag: SAS

Using PROC SGPLOT for Quick High-Quality Graphs

Soon I will travel to San Jose for the Western Users of SAS Software 2014 Educational Forum and Conference.  I’m looking forward to doing a hands-on workshop on one of my favorite topics, ODS Graphics, specifically the PROCs SGPLOT and SGPANEL.  Here is the abstract: New with SAS 9.2, ODS Graphics introduced a whole new […]

Graphics on Android

Last week, writing about admin and deployment enhancements in SAS v9.4, I mentioned my estimation of the proportion of SAS customers on the latest version of SAS (I confidently estimated less than 50%).These figures are available in other contexts. For…

NOTE: What’s More in 9.4 – Admin & Deployment

We can’t consider SAS version 9.4 to be “new” any more (it first shipped in July 2013), but if we had the numbers to show it, I’m sure we’d see that less than 50% of customers have upgraded, so it’s worth revisiting 9.4’s attractions.The complexity, ef…

Unplanned Sabbatical – NO MORE

So, it’s been a bit quiet in NOTE:land for the last six months. I last wrote in January, and it’s now August.I started the NOTE: blog in July 2009. Since then, up to January, I have posted 459 articles. That’s an average of more than 8 posts per month….

Support the Blog Author to Bike MS

My dear readers, I’m asking you to support me in Bike MS (Multiple Sclerosis) and I will ride 60 miles to support the campaign in New Bern, NC, September 6 – 7, 2014. As my understanding, one of the purposes of this fundraising, is to let the message spread. MS is a very rare disease. […]

Translate SAS’s sas7bdat format to SQLite and Pandas

Thanks Jared Hobbs’ sas7bdat package, Python can read SAS’s data sets quickly and precisely. And it will be great to have a few extension functions to enhance this package with SQLite and Pandas.
The good things to transfer SAS libraries to SQLite:
  1. Size reduction:
    SAS’s sas7bdat format is verbose. So far successfully loaded 40GB SAS data to SQLite with 85% reduction of disk usage.
  2. Save the cost to buy SAS/ACCESS
    SAS/ACCESS costs around $8,000 a year for a server, while SQLite is accessible for most common softwares.
The good things to transfer SAS data set to Pandas:
  1. Pandas’ powerful Excel interface:
    Write very large Excel file quickly as long as memory can hold data.
  2. Validation of statistics
    Pandas works well with statsmodels and scikit-learn. Easy to validate  SAS’s outputs. 

Change the process priority in SAS

This SAS code programmatically changes the process priority for the current SAS program. You may want to use this for SAS batch jobs.

For example, when I run multiprocessor jobs using Ian J. Ghent %multiThreadDataStep macro, the Windows user interface becomes less responsive and my batch job competes with other processes, but using this method addresses both issues.

Simply run the line corresponding to the desired priority level. To decrease process priority, choose one of the last two.


x "wmic.exe process where processid=""&SYSJOBID"" call setpriority 'high priority'";
x "wmic.exe process where processid=""&SYSJOBID"" call setpriority 'above normal'";
x "wmic.exe process where processid=""&SYSJOBID"" call setpriority 'normal'";
x "wmic.exe process where processid=""&SYSJOBID"" call setpriority 'below normal'";
x "wmic.exe process where processid=""&SYSJOBID"" call setpriority 'idle'";

Tested on SAS 9.4 on Windows 7 and SAS 9.3 on Windows 2008.

I don’t have SAS for Linux, but I guess it would look like this to increase the niceness and therefore reduce the process priority:


x "renice -p 16 &SYSJOBID";

For more posts like this, see Heuristic Andrew.