SAS Message Log with ODBC: COMMIT performed on connection #

January 28, 2019
By

This post was kindly contributed by Heuristic Andrew - go there to comment and to read the full post.

When using SAS to develop high-performance queries against remote SQL databases, it is helpful to see the exact ODBC messages that SAS passes to the driver. Sometimes the implicit SQL poorly translates a query, which can be optimized. To see these message, enable the SAS trace like this:


options sastrace=',,,d' sastraceloc=saslog nostsuffix;

However, when closing the SAS process, there can be a pop-up dialog window with the title “SAS Message Log” with entries like this:


ODBC: COMMIT performed on connection #6.
ODBC: COMMIT performed on connection #5.
ODBC: COMMIT performed on connection #4.
ODBC: COMMIT performed on connection #3.
ODBC: COMMIT performed on connection #2.
ODBC: COMMIT performed on connection #1.
ODBC: COMMIT performed on connection #0.

When running SAS interactively, this is a minor nuisance. When running SAS in an automated batch, this can be a serious problem because the dialog will wait indefinitely for human interaction, so the sas.exe process will never terminate.

This isn’t exactly a bug, but it can feel like it. Sadly, SAS provides no convenient options like these:

  • Never show the SAS message pop-up dialog when the SAS editor has closed.
  • Automatically close the pop-up dialog after 60 seconds of inactivity.
  • Filter all traces with the text “ODBC commit.”

The SAS developer has these options:

Tested on SAS 9.4M5 and Python 3.7 on Windows 10 and Windows Server 2008.

This post was kindly contributed by Heuristic Andrew - go there to comment and to read the full post.

Tags: ,

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.