Undocumented features: there's a reason they are not documented

1

Many SAS users love "undocumented features" within SAS software that they have found or heard about. Sometimes they can be really useful, and the fact that they are undocumented adds to the mystique. Some users have written entire conference papers on the subject.

After 35 years of evolution, SAS contains a lot of undocumented features. Visit support.sas.com and search for "undocumented" and you'll see what I mean.

Actually, at SAS we don't like to call them features; we call them "behaviors". And the reason that we don't document them is not because we are ashamed or that we want to make customers hunt for them. It's just that we know that the behavior is likely to change (based on our knowledge of the technology or the roadmap for the product), so we don't want you to get too accustomed to the behavior.

Here's an example. Suppose you know a customer who wants to limit the number of output data sets that he sees in the SAS Enterprise Guide process flow when he runs a SAS program. Did you know that if you name your output data set with a prefix of "_TO" that SAS will "hide" the data from the list of data members in a library? It's completely stealth, and won't show up in your process flow, in PROC DATASETS output, SAS EXPLORER window in Display Manager, or anywhere. (This is on SAS for Windows only -- not UNIX.) But you can still reference it in code and use it for other DATA steps and procedures. For example:

libname stealth "c:\output";
data stealth._toInvisible; /* won't show up in your windows */
  set sashelp.class;
run;
proc means data=stealth._toInvisible; /* valid - will work fine */
run;

This is an undocumented behavior (although Wei Cheng describes it in the paper I referenced). I didn't even know about it until one of our stellar tech support consultants mentioned it as a possible workaround for the SAS Enterprise Guide customer who wanted to declutter his process flow view.

This revelation motivated me to learn more about the behavior. Here's what I learned:

  • Prior to SAS 9.1, some applications within SAS for Windows could generate temporary output files, prefixed with the "_TO" name.
  • There was logic added to SAS to "hide" these artifact files, so that they didn't clutter up the view of files within the SAS EXPLORER or LIBRARIES windows.
  • In SAS 9.1, the code in SAS was changed to no longer generate these "_TO"-prefixed files. (I don't know why exactly -- but I do know that SAS Version 9 architectural changes helped tremendously to streamline processes such as this, and SAS 9.2 makes it even better).
  • However, the behavior to "mask" out the "_TO"-prefixed data members remains in SAS 9.1 and SAS 9.2.
  • But...as I've been testing in SAS 9.3 (under development now), I see that this behavior has been "fixed," and these files are no longer hidden.

The original reason for the behavior is long gone. And since SAS never documented this as an officially supported feature, the behavior has been "cleaned up" and no one will be the wiser. No one, that is, except for those of you who dive into the undocumented.

Share

About Author

Chris Hemedinger

Senior Manager, SAS Online Communities

+Chris Hemedinger is the manager of SAS Online Communities. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies.  He also hosts the SAS Tech Talk webcasts each year from SAS Global Forum, connecting viewers with smart people from SAS R&D and the impressive work that they do.

1 Comment

  1. Pingback: PROC DELETE: it’s not dead yet - The SAS Dummy

Leave A Reply

Back to Top